FerriteMeshParser

Parse a mesh file (currently, only Abaqus input files are supported) into a Ferrite.Grid. The main exported function is get_ferrite_grid, which allows you to import an abaqus mesh as

grid = get_ferrite_grid("myabaqusinput.inp")

Note that the .inp file extension is required to automatically detect that it is an Abaqus input file.

There are currently a two main limitations

  • Only one part/instance from Abaqus is supported
  • The node and element numbering must be consecutive (i.e. no missing numbers allowed)

API

FerriteMeshParser.get_ferrite_gridFunction
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?
source
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)

source