AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::mint Namespace Reference

Namespaces

 blueprint
 
 internal
 
 xargs
 

Classes

struct  CellInfo
 Holds information associated with a given cell type. More...
 
class  ConnectivityArray
 Provides an interface for general mesh connectivity. More...
 
class  CurvilinearMesh
 Provides the ability to represent and operate on structured, curvilinear meshes. More...
 
struct  FEBasis
 FEBasis is a traits class that binds a Finite Element basis type, e.g., MINT_LAGRANGE_BASIS, to a particular cell type, e.g., MINT_QUAD. More...
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::HEX >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::HEX27 >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::PRISM >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::PYRAMID >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::QUAD >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::QUAD9 >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::TET >
 
struct  FEBasis< MINT_LAGRANGE_BASIS, mint::TRIANGLE >
 
class  Field
 Field is an abstract base class which provides the following: More...
 
struct  field_traits
 Field traits struct to map a C++ primitive type to a FieldType. More...
 
struct  field_traits< axom::float32 >
 
struct  field_traits< axom::float64 >
 
struct  field_traits< axom::int32 >
 
struct  field_traits< axom::int64 >
 
class  FieldData
 Provides a container for storing fields associated with a specified mesh topology and methods to create, access and remove fields from the container. More...
 
class  FieldVariable
 Provides the ability to store, access and modify a mesh field. More...
 
class  FiniteElement
 The FiniteElement object is used to represent a mesh element \( \Omega^e \) corresponding to a mesh \( \mathcal{M} \) . More...
 
class  Lagrange
 Defines the Lagrange family of Finite Elements. More...
 
class  Lagrange< mint::HEX >
 Lagrange Finite Element definition for the Linear Hexahedron. More...
 
class  Lagrange< mint::HEX27 >
 Lagrange Finite Element definition for the triquadratic Hexahedron. More...
 
class  Lagrange< mint::PRISM >
 Lagrange Finite Element definition for the Linear Prism. More...
 
class  Lagrange< mint::PYRAMID >
 Lagrange Finite Element definition for the Linear Pyramnid. More...
 
class  Lagrange< mint::QUAD >
 Lagrange Finite Element definition for Bilinear Quadrilateral. More...
 
class  Lagrange< mint::QUAD9 >
 Lagrange Finite Element definition for the Quadratic Quadrilateral. More...
 
class  Lagrange< mint::TET >
 Lagrange Finite Element definition for the Linear Tetrahedron. More...
 
class  Lagrange< mint::TRIANGLE >
 Lagrange Finite Element definition for the Linear Triangle. More...
 
class  Mesh
 Base class that defines the core API common to all Mesh types. More...
 
class  MeshCoordinates
 Provides functionality to store and operate on mesh node coordinates. More...
 
class  ParticleMesh
 Provides the ability to store and operate on a set of particles. More...
 
class  RectilinearMesh
 Provides the ability to represent and operate on a structured rectilinear mesh. More...
 
class  ShapeFunction
 The ShapeFunction class defines the shape functions, \( N(\xi)^e \), for a given reference element \( \overline{\Omega^e} \). More...
 
class  StructuredMesh
 Base class that defines the core API common for structured mesh types. More...
 
struct  topology_traits
 
struct  topology_traits< MIXED_SHAPE >
 
struct  topology_traits< SINGLE_SHAPE >
 
class  UniformMesh
 Provides the ability to represent and operate on a UniformMesh. More...
 
class  UnstructuredMesh
 Provides the ability to store and operate on Unstructured meshes. More...
 
struct  xargs_traits
 Traits class used for compile-time checking of xargs types. More...
 
struct  xargs_traits< xargs::cellids >
 
struct  xargs_traits< xargs::coords >
 
struct  xargs_traits< xargs::faceids >
 
struct  xargs_traits< xargs::ij >
 
struct  xargs_traits< xargs::ijk >
 
struct  xargs_traits< xargs::index >
 
struct  xargs_traits< xargs::nodeids >
 
struct  xargs_traits< xargs::x >
 
struct  xargs_traits< xargs::xy >
 
struct  xargs_traits< xargs::xyz >
 

Enumerations

enum  { INVERSE_MAP_FAILED = -1, OUTSIDE_ELEMENT, INSIDE_ELEMENT }
 
enum  CellType : signed char {
  CellType::UNDEFINED_CELL = -1, CellType::VERTEX, CellType::SEGMENT, CellType::TRIANGLE,
  CellType::QUAD, CellType::TET, CellType::HEX, CellType::PRISM,
  CellType::PYRAMID, CellType::QUAD9, CellType::HEX27, CellType::NUM_CELL_TYPES
}
 Enumerates all cell types supported by Mint. More...
 
enum  ConnectivityType { NO_INDIRECTION, INDIRECTION, TYPED_INDIRECTION }
 
enum  FieldAssociation {
  ANY_CENTERING = -1, NODE_CENTERED = 0, CELL_CENTERED, FACE_CENTERED,
  EDGE_CENTERED, NUM_FIELD_ASSOCIATIONS
}
 Enumerates the number of supported associations of field variables with a corresponding mesh entity, e.g., node, cell-center, face-center, etc. More...
 
enum  FieldType {
  UNDEFINED_FIELD_TYPE = -1, FLOAT_FIELD_TYPE, DOUBLE_FIELD_TYPE, INT32_FIELD_TYPE,
  INT64_FIELD_TYPE, NUMBER_OF_FIELD_TYPES
}
 Enumerates the set of allowable field types. More...
 
enum  MeshTypes {
  UNDEFINED_MESH = -1, UNSTRUCTURED_MESH, STRUCTURED_CURVILINEAR_MESH, STRUCTURED_RECTILINEAR_MESH,
  STRUCTURED_UNIFORM_MESH, PARTICLE_MESH, NUM_MESH_TYPES
}
 Defines the basic mesh types supported by mint. More...
 
enum  Topology { SINGLE_SHAPE, MIXED_SHAPE }
 

Functions

template<int BasisType, CellType CELLTYPE>
void bind_basis (FiniteElement &fe)
 
constexpr int cellTypeToInt (CellType type)
 Return the underlying integer associated with the given CellType. More...
 
constexpr const CellInfogetCellInfo (CellType type)
 Return the CellInfo struct associated with the given type. More...
 
int read_su2 (const std::string &file, Mesh *&mesh)
 Reads an unstructured mesh from an SU2 Mesh file. More...
 
int write_su2 (const mint::Mesh *mesh, const std::string &file)
 Writes an unstructured mesh to the specified file according to the SU2 Mesh file format. More...
 
int write_vtk (const Mesh *mesh, const std::string &file_path)
 Writes a mesh to a VTK file using the legacy ASCII format. that can be visualized with VisIt or ParaView. More...
 
int write_vtk (mint::FiniteElement &fe, const std::string &file_path)
 Writes a FiniteElement to a VTK file in the legacy ASCII format. More...
 
Mesh Node Traversal Functions
template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void for_all_nodes (const MeshType *m, KernelType &&kernel)
 Loops over the nodes of the given mesh. More...
 
template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void for_all_nodes (const Mesh *m, KernelType &&kernel)
 
Mesh Cell Traversal Functions
template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void for_all_cells (const MeshType *m, KernelType &&kernel)
 Loops over all the cells of a given mesh. More...
 
template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void for_all_cells (const Mesh *m, KernelType &&kernel)
 
Mesh Face Traversal Functions
template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void for_all_faces (const MeshType *m, KernelType &&kernel)
 Loops over all the faces of a given mesh. More...
 
template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void for_all_faces (const Mesh *m, KernelType &&kernel)
 

Variables

static const std::string basis_name []
 Array of strings corresponding to each Finite Element Basis. More...
 
static const double PRISM_ONE_THIRD = 1.0 / 3.0
 
static const double TRI_ONE_THIRD = 1.0 / 3.0
 
static constexpr int MAX_CELL_NODES = 27
 
static constexpr int MAX_CELL_FACES = 6
 
static constexpr int MAX_FACE_NODES = 9
 
static constexpr int MAX_ALL_FACES_NODES = MAX_CELL_FACES * MAX_FACE_NODES
 
constexpr CellType UNDEFINED_CELL = CellType::UNDEFINED_CELL
 
constexpr CellType VERTEX = CellType::VERTEX
 
constexpr CellType SEGMENT = CellType::SEGMENT
 
constexpr CellType TRIANGLE = CellType::TRIANGLE
 
constexpr CellType QUAD = CellType::QUAD
 
constexpr CellType TET = CellType::TET
 
constexpr CellType HEX = CellType::HEX
 
constexpr CellType PRISM = CellType::PRISM
 
constexpr CellType PYRAMID = CellType::PYRAMID
 
constexpr CellType QUAD9 = CellType::QUAD9
 
constexpr CellType HEX27 = CellType::HEX27
 
constexpr int NUM_CELL_TYPES = static_cast<int>(CellType::NUM_CELL_TYPES)
 
static const CellInfo cell_info [NUM_CELL_TYPES]
 Array of CellInfo corresponding to each cell type. More...
 
static constexpr int X_COORDINATE = 0
 
static constexpr int Y_COORDINATE = 1
 
static constexpr int Z_COORDINATE = 2
 
constexpr int I_DIRECTION = 0
 
constexpr int J_DIRECTION = 1
 
constexpr int K_DIRECTION = 2
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
INVERSE_MAP_FAILED 

INVERSE_MAP_FAILED

OUTSIDE_ELEMENT 

OUTSIDE_ELEMENT

INSIDE_ELEMENT 

INSIDE_ELEMENT

◆ CellType

enum axom::mint::CellType : signed char
strong

Enumerates all cell types supported by Mint.

Enumerator
UNDEFINED_CELL 

UNDEFINED.

VERTEX 

VERTEX.

SEGMENT 

LINE_SEGMENT.

TRIANGLE 

LINEAR_TRIANGLE.

QUAD 

LINEAR_QUAD.

TET 

LINEAR_TET.

HEX 

LINEAR_HEX.

PRISM 

LINEAR_PRISM.

PYRAMID 

LINEAR_PYRAMID.

QUAD9 

QUADRATIC QUAD.

HEX27 

QUADRATIC HEX.

NUM_CELL_TYPES 

total number of cell types

◆ ConnectivityType

Enumerator
NO_INDIRECTION 
INDIRECTION 
TYPED_INDIRECTION 

◆ FieldAssociation

Enumerates the number of supported associations of field variables with a corresponding mesh entity, e.g., node, cell-center, face-center, etc.

Enumerator
ANY_CENTERING 

wild-card used to indicate any centering

NODE_CENTERED 

used for fields computed at mesh nodes

CELL_CENTERED 

used for fields computed at cell centers

FACE_CENTERED 

used for fields computed at face centers

EDGE_CENTERED 

used for fields computed at edge centers

NUM_FIELD_ASSOCIATIONS 

max number of field associations

◆ FieldType

Enumerates the set of allowable field types.

Enumerator
UNDEFINED_FIELD_TYPE 

UNDEFINED_FIELD_TYPE.

FLOAT_FIELD_TYPE 

single-precision floating point field type

DOUBLE_FIELD_TYPE 

double-precision floating point field type

INT32_FIELD_TYPE 

fixed width 32-bit integer field type

INT64_FIELD_TYPE 

fixed width 64-bit integer field type

NUMBER_OF_FIELD_TYPES 

NUMBER_OF_FIELD_TYPES.

◆ MeshTypes

Defines the basic mesh types supported by mint.

Enumerator
UNDEFINED_MESH 

UNDEFINED_MESH.

UNSTRUCTURED_MESH 

UNSTRUCTURED_MESH.

STRUCTURED_CURVILINEAR_MESH 

STRUCTURED_MESH.

STRUCTURED_RECTILINEAR_MESH 

RECTILINEAR_MESH.

STRUCTURED_UNIFORM_MESH 

UNIFORM_MESH.

PARTICLE_MESH 

PARTICLE_MESH.

NUM_MESH_TYPES 

NUM_MESH_TYPES.

◆ Topology

Enumerator
SINGLE_SHAPE 
MIXED_SHAPE 

Function Documentation

◆ bind_basis()

template<int BasisType, CellType CELLTYPE>
void axom::mint::bind_basis ( FiniteElement fe)
Parameters
[in]fereference to a finite element object.
Template Parameters
BasisTypethe basis type, e.g., MINT_LAGRANGE_BASIS
CellTypethe cell type, e.g., MINT_QUAD, etc.
Postcondition
fe.getBasisType() != MINT_UNDEFINED_BASIS

References axom::mint::FiniteElement::getCellType(), axom::utilities::max(), axom::utilities::min(), MINT_UNDEFINED_BASIS, SLIC_ASSERT, and SLIC_WARNING.

◆ cellTypeToInt()

◆ getCellInfo()

◆ read_su2()

int axom::mint::read_su2 ( const std::string &  file,
Mesh *&  mesh 
)

Reads an unstructured mesh from an SU2 Mesh file.

Parameters
[in]filepath corresponding to su2 mesh file.
[out]meshpointer to a mesh object where the mesh will be loaded.
Returns
status error code, zero on success
Note
The SU2 Mesh file format is documented here: https://su2code.github.io/docs/Mesh-File/
The current implementation ignores the boundary markers.
Ownership of the mesh object is passed to the caller. Consequently, the caller is responsible for properly deallocating the mesh object that the return mesh pointer points to.
Precondition
file.length() > 0
mesh == nullptr
Postcondition
mesh->isUnstructured()==true

◆ write_su2()

int axom::mint::write_su2 ( const mint::Mesh mesh,
const std::string &  file 
)

Writes an unstructured mesh to the specified file according to the SU2 Mesh file format.

Parameters
[in]meshpointer to the mesh to write.
[in]filepath to the file where to write the mesh.
Returns
status error code, zero on success
Note
The SU2 Mesh file format is documented here: https://su2code.github.io/docs/Mesh-File/
The current implementation ignores the boundary markers.
Precondition
mesh != nullptr
mesh->isUnstructured()==true
file.lenght() > 0

◆ write_vtk() [1/2]

int axom::mint::write_vtk ( const Mesh mesh,
const std::string &  file_path 
)

Writes a mesh to a VTK file using the legacy ASCII format. that can be visualized with VisIt or ParaView.

Parameters
[in]meshthe mesh to write out.
[in]file_paththe path of the file to write to.
Returns
an error code, zero signifies a successful write.
Precondition
mesh != nullptr
Note
This method is primarily intended for debugging.

◆ write_vtk() [2/2]

int axom::mint::write_vtk ( mint::FiniteElement fe,
const std::string &  file_path 
)

Writes a FiniteElement to a VTK file in the legacy ASCII format.

Parameters
[in]fereference to the finite element object.
[in]file_pathpath to the file to write
Note
This method is primarily intended for debugging.
Returns
rc return code, zero signifies success

◆ for_all_nodes() [1/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void axom::mint::for_all_nodes ( const MeshType *  m,
KernelType &&  kernel 
)
inline

Loops over the nodes of the given mesh.

Parameters
[in]mpointer to the mesh object
[in]kerneluser-supplied lambda consisting of the kernel
Precondition
m != nullptr
Template Parameters
ExecPolicythe execution policy, e.g., serial or parallel
ArgTypeobject indicating the arguments to the kernel
KernelTypeUsage Example:
for_all_nodes< exec >( m,
{ ... }
);
for_all_nodes< exec, xargs::ij >( m,
{ ... }
);
for_all_nodes< exec, xargs::ijk >( m,
AXOM_LAMDA( IndexType nodeIdx, IndexType i, IndexType j, IndexType k)
{ ... }
);
for_all_nodes< exec, xargs::xy >( m,
AXOM_LAMBA( IndexType nodeIdx, double x, double y)
{ ... }
);
for_all_nodes< exec, xargs::xyz >( m,
AXOM_LAMBA( IndexType nodeIdx, double x, double y, double z)
{ ... }
);
See also
execution_space.hpp
xargs.hpp

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

◆ for_all_nodes() [2/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void axom::mint::for_all_nodes ( const Mesh m,
KernelType &&  kernel 
)
inline

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

◆ for_all_cells() [1/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void axom::mint::for_all_cells ( const MeshType *  m,
KernelType &&  kernel 
)
inline

Loops over all the cells of a given mesh.

Parameters
[in]mpointer to the mesh object.
[in]kerneluser-supplied kernel to execute on each cell.
Precondition
m != nullptr
Template Parameters
ExecPolicythe execution policy, e.g., serial or parallel
ArgTypeobject indicating the arguments to the kernel

Usage Example:

for_all_cells< exec >( m,
{ ... }
);
for_all_cells< exec, xargs::ij >( m,
{ ... }
);
for_all_cells< exec, xargs::ijk >( m,
{ ... }
);
for_all_cells< exec, xargs::nodeids >( m,
AXOM_LAMBDA( IndexType cellID, const IndexType* nodeIDs, IndexType N )
{ ... }
);
for_all_cells< exec, xargs::coords >( m,
const IndexType * nodeIDs )
{ ... }
);
for_all_cells< exec, xargs::faceids >( m,
AXOM_LAMBDA( IndexType cellID, const IndexType* faceIDs, IndexType N )
{ ... }
);
See also
execution_space.hpp
xargs.hpp

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

◆ for_all_cells() [2/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void axom::mint::for_all_cells ( const Mesh m,
KernelType &&  kernel 
)
inline

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

◆ for_all_faces() [1/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename MeshType , typename KernelType >
void axom::mint::for_all_faces ( const MeshType *  m,
KernelType &&  kernel 
)
inline

Loops over all the faces of a given mesh.

Parameters
[in]mpointer to the mesh object.
[in]kerneluser-supplied kernel to execute on each face.
Precondition
m != nullptr
Template Parameters
ExecPolicythe execution policy, e.g., serial or parallel
ArgTypeobject indicating the arguments to the kernel

Usage Example:

for_all_faces< exec >( m,
{ ... }
);
for_all_faces< exec, xargs::nodeids >( m,
AXOM_LAMBDA( IndexType faceID, const IndexType* nodeIDs, IndexType N )
{ ... }
);
for_all_faces< exec, xargs::coords >( m,
const IndexType * nodeIDs )
{ ... }
);
for_all_faces< exec, xargs::cellids >( m,
AXOM_LAMBDA( IndexType faceID, IndexType cellIDOne, IndexType cellIDTwo )
{ ... }
);
Note
A face can be associated with one or two cells, depending on whether it is an external boundary face or interior face. By convention, if a face is an external boundary face, then only cellIDOne exists and cellIDTwo will be set to -1.
See also
execution_space.hpp
xargs.hpp

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

◆ for_all_faces() [2/2]

template<typename ExecPolicy , typename ArgType = xargs::index, typename KernelType >
void axom::mint::for_all_faces ( const Mesh m,
KernelType &&  kernel 
)
inline

References AXOM_STATIC_ASSERT, and SLIC_ASSERT.

Variable Documentation

◆ basis_name

const std::string axom::mint::basis_name[]
static
Initial value:
= {
"LAGRANGE_BASIS",
}

Array of strings corresponding to each Finite Element Basis.

Note
The length of the array is MINT_NUM_BASIS
It is used to get a string representation for a Finite Element basis, e.g., for, debugging etc.

◆ PRISM_ONE_THIRD

const double axom::mint::PRISM_ONE_THIRD = 1.0 / 3.0
static

◆ TRI_ONE_THIRD

const double axom::mint::TRI_ONE_THIRD = 1.0 / 3.0
static

◆ MAX_CELL_NODES

constexpr int axom::mint::MAX_CELL_NODES = 27
static

◆ MAX_CELL_FACES

constexpr int axom::mint::MAX_CELL_FACES = 6
static

◆ MAX_FACE_NODES

constexpr int axom::mint::MAX_FACE_NODES = 9
static

◆ MAX_ALL_FACES_NODES

constexpr int axom::mint::MAX_ALL_FACES_NODES = MAX_CELL_FACES * MAX_FACE_NODES
static

◆ UNDEFINED_CELL

constexpr CellType axom::mint::UNDEFINED_CELL = CellType::UNDEFINED_CELL

◆ VERTEX

constexpr CellType axom::mint::VERTEX = CellType::VERTEX

◆ SEGMENT

constexpr CellType axom::mint::SEGMENT = CellType::SEGMENT

◆ TRIANGLE

constexpr CellType axom::mint::TRIANGLE = CellType::TRIANGLE

◆ QUAD

constexpr CellType axom::mint::QUAD = CellType::QUAD

◆ TET

constexpr CellType axom::mint::TET = CellType::TET

◆ HEX

constexpr CellType axom::mint::HEX = CellType::HEX

◆ PRISM

constexpr CellType axom::mint::PRISM = CellType::PRISM

◆ PYRAMID

constexpr CellType axom::mint::PYRAMID = CellType::PYRAMID

◆ QUAD9

constexpr CellType axom::mint::QUAD9 = CellType::QUAD9

◆ HEX27

constexpr CellType axom::mint::HEX27 = CellType::HEX27

◆ NUM_CELL_TYPES

constexpr int axom::mint::NUM_CELL_TYPES = static_cast<int>(CellType::NUM_CELL_TYPES)

◆ cell_info

const CellInfo axom::mint::cell_info[NUM_CELL_TYPES]
static
Initial value:
static const CellInfo PYRAMID_INFO
Definition: CellTypes.hpp:282
static const CellInfo PRISM_INFO
Definition: CellTypes.hpp:255
static const CellInfo HEX27_INFO
Definition: CellTypes.hpp:318
static const CellInfo TRIANGLE_INFO
Definition: CellTypes.hpp:167
static const CellInfo TET_INFO
Definition: CellTypes.hpp:209
static const CellInfo SEGMENT_INFO
Definition: CellTypes.hpp:150
static const CellInfo VERTEX_INFO
Definition: CellTypes.hpp:137
static const CellInfo HEX_INFO
Definition: CellTypes.hpp:226
static const CellInfo QUAD_INFO
Definition: CellTypes.hpp:186
static const CellInfo QUAD9_INFO
Definition: CellTypes.hpp:301

Array of CellInfo corresponding to each cell type.

Note
The order at which CellInfo for each type is added has to match the order of the cell types in the CellTypes enum above.

◆ X_COORDINATE

constexpr int axom::mint::X_COORDINATE = 0
static

◆ Y_COORDINATE

constexpr int axom::mint::Y_COORDINATE = 1
static

◆ Z_COORDINATE

constexpr int axom::mint::Z_COORDINATE = 2
static

◆ I_DIRECTION

constexpr int axom::mint::I_DIRECTION = 0

◆ J_DIRECTION

constexpr int axom::mint::J_DIRECTION = 1

◆ K_DIRECTION

constexpr int axom::mint::K_DIRECTION = 2