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_facesets=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_facesets: Should facesets be automatically generated from all nodesets?
source
FerriteMeshParser.create_facesetFunction
create_faceset(
    grid::Ferrite.AbstractGrid, 
    nodeset::Set{Int}, 
    cellset::Union{UnitRange{Int},Set{Int}}=1:getncells(grid)
    )

Find the faces in the grid for which all nodes are in nodeset. Return them as a Set{FaceIndex}. 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_facesets=false. The created faceset can be added to the grid as addfaceset!(grid, "facesetkey", faceset)

source