FerriteMeshParser.create_facetsetFunction
create_facetset(
    grid::Ferrite.AbstractGrid, 
    nodeset::Set{Int}, 
    cellset::Union{UnitRange{Int},Set{Int}}=1:getncells(grid)
    )

Find the facets in the grid for which all nodes are in nodeset. Return them as a Set{FacetIndex}. A cellset can be given to only look only for faces amongst those cells to speed up the computation. Otherwise the search is over all cells.

This function is normally only required when calling get_ferrite_grid with generate_facetsets=false. The created facetset can be added to the grid as addfacetset!(grid, "facetsetkey", facetset)

FerriteMeshParser.generate_facetsets!Method
function generate_facetsets!(grid::Ferrite.Grid)

Based on all nodesets in grid, generate facesets for those sets. If there is a cellset in the grid with the same name as the nodeset, only facets for cells in that cellset with be created.

FerriteMeshParser.get_ferrite_gridMethod
function get_ferrite_grid(
    filename; 
    meshformat=AutomaticMeshFormat(), 
    user_elements=Dict{String,DataType}(), 
    generate_facetsets=true
    )

Create a Ferrite.Grid by reading in the file specified by filename.

Optional arguments:

  • meshformat: Which format the mesh is given in, normally automatically detected by the file extension
  • user_elements: Used to add extra elements not supported, might require a separate cell constructor.
  • generate_facetsets: Should facesets be automatically generated from all nodesets?