AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::mint::UnstructuredMesh< TOPO > Class Template Referenceabstract

Provides the ability to store and operate on Unstructured meshes. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/mint/mesh/UnstructuredMesh.hpp>

Inheritance diagram for axom::mint::UnstructuredMesh< TOPO >:

Public Types

using CellSet = typename topology_traits< TOPO >::ZoneSet
 
using NodeSet = typename topology_traits< TOPO >::NodeSet
 
using FaceSet = typename topology_traits< TOPO >::FaceSet
 
using CellToNodeRelation = typename topology_traits< TOPO >::ZoneNodeRelation
 
using CellToFaceRelation = typename topology_traits< TOPO >::ZoneFaceRelation
 The types for face-cell and cell-face relations. More...
 
using FaceToCellRelation = typename topology_traits< TOPO >::FaceZoneRelation
 
using FaceToNodeRelation = typename topology_traits< TOPO >::FaceNodeRelation
 The type for face-node relations. More...
 
using CellToNodeConnectivity = ConnectivityArray< topology_traits< TOPO >::cell_to_nodes >
 

Public Member Functions

 UnstructuredMesh ()=delete
 Default constructor. Disabled. More...
 
virtual bool isExternal () const final override
 Return true iff both the connectivity and coordinates are stored in external arrays. More...
 
void resize (IndexType node_size, IndexType cell_size)
 Resizes this mesh instance to the specified number of nodes & cells. More...
 
void reserve (IndexType node_capacity, IndexType cell_capacity, IndexType connectivity_capacity=USE_DEFAULT)
 Reserve space for the given number of nodes and cells. More...
 
void shrink ()
 Shrink the node capacity to be equal to the number of nodes and the cell capacity to be equal to the number of cells. More...
 
bool empty () const
 Return true iff the mesh holds no nodes and no cells. More...
 
bool isInSidre () const
 Return true iff both the connectivity and coordinates are stored in sidre. More...
 
void appendCell (const IndexType *connec, CellType type=UNDEFINED_CELL)
 Append a cell to the mesh. More...
 
void appendCells (const IndexType *connec, IndexType n_cells, const IndexType *offsets=nullptr, const CellType *types=nullptr)
 Append multiple cells to the mesh. More...
 
void insertCell (const IndexType *connec, IndexType ID, CellType type=UNDEFINED_CELL)
 Insert a cell in to the mesh at the given position. More...
 
void insertCells (const IndexType *connec, IndexType start_ID, IndexType n_cells, const IndexType *offsets=nullptr, const CellType *types=nullptr)
 Insert multiple cells in to the mesh at the given position. More...
 
void appendNodes (const double *coords, IndexType n=1)
 Appends multiple nodes to the mesh. More...
 
void insertNodes (IndexType nodeID, const double *coords, IndexType n=1, bool update_connectivity=true)
 Inserts multiple nodes to the mesh. More...
 
Native Storage Constructors
 UnstructuredMesh (int ndims, CellType cell_type, IndexType node_capacity=USE_DEFAULT, IndexType cell_capacity=USE_DEFAULT)
 Constructs an Unstructured single topology mesh. More...
 
 UnstructuredMesh (int ndims, IndexType node_capacity=USE_DEFAULT, IndexType cell_capacity=USE_DEFAULT, IndexType connectivity_capacity=USE_DEFAULT)
 Constructs an Unstructured mixed topology mesh. More...
 
External Storage Constructors
 UnstructuredMesh (CellType cell_type, IndexType n_cells, IndexType cell_capacity, IndexType *connectivity, IndexType n_nodes, IndexType node_capacity, double *x, double *y=nullptr, double *z=nullptr)
 Constructs an Unstructured single topology mesh using the provided external buffers. More...
 
 UnstructuredMesh (CellType cell_type, IndexType n_cells, IndexType *connectivity, IndexType n_nodes, double *x, double *y=nullptr, double *z=nullptr)
 Constructs an Unstructured single topology mesh using the provided external buffers. More...
 
 UnstructuredMesh (IndexType n_cells, IndexType cell_capacity, IndexType connectivity_capacity, IndexType *connectivity, IndexType *offsets, CellType *types, IndexType n_nodes, IndexType node_capacity, double *x, double *y=nullptr, double *z=nullptr)
 Constructs an Unstructured mixed topology mesh using the provided external buffers. More...
 
 UnstructuredMesh (IndexType n_cells, IndexType connectivity_size, IndexType *connectivity, IndexType *offsets, CellType *types, IndexType n_nodes, double *x, double *y=nullptr, double *z=nullptr)
 Constructs an Unstructured mixed topology mesh using the provided external mesh buffers. More...
 
Virtual methods
virtual ~UnstructuredMesh ()
 Destructor, deletes the MeshCoordinates and ConnectivityArray. More...
 
Cells
virtual IndexType getNumberOfCells () const final override
 Return the number of cells in the mesh. More...
 
virtual IndexType getCellCapacity () const final override
 Return the capacity for cells. More...
 
virtual CellType getCellType (IndexType cellID=-1) const final override
 Return the type of the given cell. More...
 
virtual IndexType getNumberOfCellNodes (IndexType cellID=0) const final override
 Return the number of nodes associated with the given cell. More...
 
virtual IndexType getCellNodeIDs (IndexType cellID, IndexType *nodes) const final override
 Copy the connectivity of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes( cellID ). More...
 
virtual IndexType getNumberOfCellFaces (IndexType cellID=0) const final override
 Return the number of faces associated with the given cell. More...
 
virtual IndexType getCellFaceIDs (IndexType cellID, IndexType *faces) const final override
 Copy the face IDs of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellFaces( cellID ). More...
 
double getCellResizeRatio () const
 Return the cell resize ratio. More...
 
void setCellResizeRatio (double ratio)
 Set the cell resize ratio. More...
 
IndexType getCellNodesSize () const
 Return the size of the connectivity array. More...
 
IndexType getCellNodesCapacity () const
 Return the capacity of the connectivity array. More...
 
void resizeCells (IndexType cell_size)
 Resizes the cell connectivity array and cell-centered fields of this mesh instance to hold the specified number of cells. More...
 
void reserveCells (IndexType cell_capacity, IndexType connectivity_capacity=USE_DEFAULT)
 Reserve space for the given number of cells. More...
 
void shrinkCells ()
 Shrink the cell capacity to be equal to the number of cells. More...
 
IndexTypegetCellNodeIDs (IndexType cellID)
 Return a pointer to the connectivity of the given cell. The buffer is guarenteed to be of length at least getNumberOfCellNodes( cellID ). More...
 
const IndexTypegetCellNodeIDs (IndexType cellID) const
 
IndexTypegetCellFaceIDs (IndexType cellID)
 Return a pointer to the faces of the given cell. The buffer is guarenteed to be of length at least getNumberOfCellFaces( cellID ). More...
 
const IndexTypegetCellFaceIDs (IndexType cellID) const
 
Nodes
virtual IndexType getNumberOfNodes () const final override
 Return the number of nodes in the mesh. More...
 
virtual IndexType getNodeCapacity () const final override
 Return the capacity for nodes. More...
 
virtual void getNode (IndexType nodeID, double *coords) const final override
 Copy the coordinates of the given node into the provided buffer. More...
 
virtual double * getCoordinateArray (int dim) final override
 Return a pointer to the array of nodal coordinates of the given dimension. More...
 
virtual const double * getCoordinateArray (int dim) const final override
 
double getNodeResizeRatio () const
 Return the node resize ratio. More...
 
void setNodeResizeRatio (double ratio)
 Set the node resize ratio. More...
 
void resizeNodes (IndexType nodes_size)
 Resizes the nodal coordinates and fields of this mesh instance to the specified number of nodes. More...
 
void reserveNodes (IndexType node_capacity)
 Reserve space for the given number of nodes. More...
 
void shrinkNodes ()
 Shrink the node capacity to be equal to the number of nodes. More...
 
double getNodeCoordinate (IndexType nodeID, int dim) const
 Return the coordinate of the given dimension of the given node. More...
 
IndexType appendNode (double x)
 Appends a new node to the mesh. More...
 
IndexType appendNode (double x, double y)
 
IndexType appendNode (double x, double y, double z)
 
Faces
virtual IndexType getNumberOfFaces () const final override
 Return the number of faces in the mesh. More...
 
virtual IndexType getFaceCapacity () const final override
 Return the capacity for faces. More...
 
virtual CellType getFaceType (IndexType faceID) const final override
 Return the type of the given face. More...
 
virtual IndexType getNumberOfFaceNodes (IndexType faceID=0) const final override
 Return the number of nodes associated with the given face. More...
 
virtual IndexType getFaceNodeIDs (IndexType faceID, IndexType *nodes) const final override
 Copy the IDs of the nodes that compose the given face into the provided buffer. More...
 
virtual void getFaceCellIDs (IndexType faceID, IndexType &cellIDOne, IndexType &cellIDTwo) const final override
 Copy the IDs of the cells adjacent to the given face into the provided indices. More...
 
double getFaceResizeRatio () const
 Return the face resize ratio. More...
 
IndexType getFaceNodesSize () const
 Return the size of the connectivity array. More...
 
IndexType getFaceNodesCapacity () const
 Return the capacity of the connectivity array. More...
 
bool initializeFaceConnectivity (bool force=false)
 Sets up cell-face, face-cell, and face-node connectivity. More...
 
IndexTypegetFaceNodeIDs (IndexType faceID)
 Return a pointer to the nodes of the given face. The buffer is guaranteed to be of length at least getNumberOfFaceNodes( faceID ). More...
 
const IndexTypegetFaceNodeIDs (IndexType faceID) const
 
Edges
virtual IndexType getNumberOfEdges () const final override
 Return the number of edges in the mesh. More...
 
virtual IndexType getEdgeCapacity () const final override
 Return the capacity for edges. More...
 
double getEdgeResizeRatio () const
 Return the edge resize ratio. More...
 
IndexTypegetCellNodesArray ()
 Return a pointer to the cell nodes array, of length getCellNodesSize(). More...
 
const IndexTypegetCellNodesArray () const
 
IndexTypegetCellNodesOffsetsArray ()
 Return a pointer to the cell nodes offset array, of length getNumberOfCells() + 1. Returns nullptr if TOPO == SINGLE_SHAPE. More...
 
const IndexTypegetCellNodesOffsetsArray () const
 
CellTypegetCellTypesArray ()
 Return a pointer to the cell types array, of length getNumberOfCells(). Returns nullptr if TOPO == SINGLE_SHAPE. More...
 
const CellTypegetCellTypesArray () const
 
IndexTypegetCellFacesArray ()
 Return a pointer to the cell faces array, of length getCellNodesSize(). More...
 
const IndexTypegetCellFacesArray () const
 
IndexTypegetCellFacesOffsetsArray ()
 Return a pointer to the cell faces offset array, of length getNumberOfCells() + 1. More...
 
const IndexTypegetCellFacesOffsetsArray () const
 
void appendNodes (const double *x, const double *y, IndexType n)
 Appends new nodes to the mesh. More...
 
void appendNodes (const double *x, const double *y, const double *z, IndexType n)
 
void insertNode (IndexType nodeID, double x, bool update_connectivity=true)
 Insert a node to the mesh. More...
 
void insertNode (IndexType nodeID, double x, double y, bool update_connectivity=true)
 
void insertNode (IndexType nodeID, double x, double y, double z, bool update_connectivity=true)
 
void insertNodes (IndexType nodeID, const double *x, const double *y, IndexType n, bool update_connectivity=true)
 Insert multiple nodes to the mesh. More...
 
void insertNodes (IndexType nodeID, const double *x, const double *y, const double *z, IndexType n, bool update_connectivity=true)
 
IndexTypegetFaceNodesArray ()
 Return a pointer to the face nodes array, of length getFaceNodesSize(). More...
 
const IndexTypegetFaceNodesArray () const
 
IndexTypegetFaceNodesOffsetsArray ()
 Return a pointer to the face nodes offset array, of length getNumberOfFaces() + 1. More...
 
const IndexTypegetFaceNodesOffsetsArray () const
 
IndexTypegetFaceCellsArray ()
 Return a pointer to the face cells array, of length 2 * getNumberOfFaces(). More...
 
const IndexTypegetFaceCellsArray () const
 
Cells
virtual IndexType getCellNodeIDs (IndexType AXOM_UNUSED_PARAM(cellID), IndexType *AXOM_UNUSED_PARAM(nodes)) const =0
 Copy the connectivity of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes( cellID ). More...
 
virtual IndexType getNumberOfCellFaces (IndexType AXOM_UNUSED_PARAM(cellID)=0) const =0
 Return the number of faces associated with the given cell. More...
 
virtual IndexType getCellFaceIDs (IndexType AXOM_UNUSED_PARAM(cellID), IndexType *AXOM_UNUSED_PARAM(faces)) const =0
 Populates the given buffer with the IDs of the faces of the given cell and returns the number of faces. More...
 
Faces
virtual CellType getFaceType (IndexType AXOM_UNUSED_PARAM(faceID)) const =0
 Return the type of the given face. More...
 
virtual IndexType getNumberOfFaceNodes (IndexType AXOM_UNUSED_PARAM(faceID)) const =0
 Return the number of nodes associated with the given face. More...
 
virtual IndexType getFaceNodeIDs (IndexType AXOM_UNUSED_PARAM(faceID), IndexType *AXOM_UNUSED_PARAM(nodes)) const =0
 Copy the IDs of the nodes that compose the given face into the provided buffer. More...
 
virtual void getFaceCellIDs (IndexType AXOM_UNUSED_PARAM(faceID), IndexType &AXOM_UNUSED_PARAM(cellIDOne), IndexType &AXOM_UNUSED_PARAM(cellIDTwo)) const =0
 Copy the IDs of the cells adjacent to the given face into the provided indices. More...
 
Mesh Attribute get/set Methods
int getDimension () const
 Returns the dimension for this mesh instance. More...
 
int getBlockId () const
 Returns the ID of this mesh instance. More...
 
void setBlockId (int ID)
 set the block ID of this mesh instance. More...
 
int getPartitionId () const
 Returns the partition ID of this mesh instance. More...
 
void setPartitionId (int ID)
 set the partition ID of this mesh instance. More...
 
int getMeshType () const
 Returns the mesh type of this mesh instance. More...
 
bool hasExplicitCoordinates () const
 Checks if this mesh instance has explicit coordinates. More...
 
bool hasExplicitConnectivity () const
 Checks if this mesh instance has explicit connectivity. More...
 
bool hasMixedCellTypes () const
 Checks if the mesh has mixed cell types, e.g., consisting of both triangle and quad elements or hex,pyramid,prisms and tets in 3-D. More...
 
bool isStructured () const
 Returns true if the mesh type is structured. More...
 
bool isUnstructured () const
 Returns true if the mesh type is unstructured. More...
 
bool hasSidreGroup () const
 Checks if this Mesh instance is associated with a Sidre Group. More...
 
Methods to Create, Access & Remove Fields from a Mesh
const FieldDatagetFieldData (int association) const
 Returns const pointer to the FieldData instance with the specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc. More...
 
bool hasField (const std::string &name, int association=ANY_CENTERING) const
 Check if a field with the given name and association exists. More...
 
template<typename T >
T * createField (const std::string &name, int association, IndexType num_components=1, bool storeInSidre=true)
 Creates a new field with the given name and specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc. More...
 
template<typename T >
T * createField (const std::string &name, int association, T *data, IndexType num_components=1, IndexType capacity=USE_DEFAULT)
 Creates a new field from an external buffer that has the given name and specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc. More...
 
bool removeField (const std::string &name, int association)
 Removes the field with the given name and specified association. More...
 
template<typename T >
T * getFieldPtr (const std::string &name, int association, IndexType &num_components)
 Returns pointer to buffer of the field with the given ane and specified mesh field association. More...
 
template<typename T >
T * getFieldPtr (const std::string &name, int association)
 
template<typename T >
const T * getFieldPtr (const std::string &name, int association, IndexType &num_components) const
 
template<typename T >
const T * getFieldPtr (const std::string &name, int association) const
 

Protected Attributes

Protected Members
int m_ndims
 
int m_type
 
int m_block_idx
 
int m_part_idx
 
bool m_explicit_coords
 
bool m_explicit_connectivity
 
bool m_has_mixed_topology
 
FieldDatam_mesh_fields [NUM_FIELD_ASSOCIATIONS]
 

Detailed Description

template<Topology TOPO>
class axom::mint::UnstructuredMesh< TOPO >

Provides the ability to store and operate on Unstructured meshes.

An unstructured mesh stores both node and topology information explicitly. This allows the flexibility of discretizing the solution domain using a variety of cell types not just quadrilateral (in 2D) or hexahedral (in 3D) cells. Due to this added flexibility, the use of unstructured meshes is more common when dealing with complex geometries. However, unstructured meshes require additional storage and generally incur some performance penalty to store, create and access mesh topology information respectively.

Mint classifies unstructured meshes in two basic types based on the underlying mesh topology:

  • Single Shape Topology

    In this case, the unstructured mesh consists of a single cell type, e.g., a quad or triangle mesh in 2D, or, a hex or tet mesh in 3D. In this case the underlying implementation is optimized for the specified cell type (specified in the constructor).

  • Mixed Shape Topology

    When mixed cell topology is specified, the unstructured mesh can be composed of any of the supported cell types, e.g., a mesh consisting of both quads and triangles. This mode incurs additional overhead for storage and access to mesh topology information, since it requires indirection.

The list of supported cell types for an unstructured mesh is available in CellTypes.hpp

An UnstructuredMesh object may be constructed using (a) native storage, (b) external storage, or, (c) with Sidre storage when Mint is compiled with Sidre support:

  • Native Storage

    When using native storage, the Unstructured object owns all memory associated with the particle data. The storage can grow dynamically as needed by the application, i.e., adding more nodes/cells. Once the mesh object goes out-of-scope, all memory associated with it is returned to the system.

  • External Storage

    An UnstructuredMesh may also be constructed from external, user-supplied buffers. In this case, all memory associated with the mesh data is owned by the caller. Consequently, the mesh cannot grow dynamically. All calls to resize(), append(), etc. will fail with an error.

  • Sidre

    An UnstructuredMesh may also be constructed using Sidre as the back-end data-store manager. The mesh data is laid out in Sidre according to the computational mesh blueprint conventions. In this case, all operations are supported, including dynamically resizing the mesh and growing the associated storage as needed. However, Sidre owns all the memory. Once the mesh object goes out-of-scope, the data remains persistent in Sidre.

See also
mint::Mesh
mint::CellTypes

Member Typedef Documentation

◆ CellSet

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::CellSet = typename topology_traits<TOPO>::ZoneSet

◆ NodeSet

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::NodeSet = typename topology_traits<TOPO>::NodeSet

◆ FaceSet

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::FaceSet = typename topology_traits<TOPO>::FaceSet

◆ CellToNodeRelation

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::CellToNodeRelation = typename topology_traits<TOPO>::ZoneNodeRelation

◆ CellToFaceRelation

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::CellToFaceRelation = typename topology_traits<TOPO>::ZoneFaceRelation

The types for face-cell and cell-face relations.

Usually, each face will connect two cells. The exceptions are

  • edge faces, which will connect to one cell. The other will be -1.
  • some faces in a malformed mesh, which may join more than two cells. The consensus is that storing such a non-manifold mesh is not useful so we only store the first two incident cells and return an error.

◆ FaceToCellRelation

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::FaceToCellRelation = typename topology_traits<TOPO>::FaceZoneRelation

◆ FaceToNodeRelation

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::FaceToNodeRelation = typename topology_traits<TOPO>::FaceNodeRelation

The type for face-node relations.

This is represented as a variable-cardinality relation regardless of whether the mesh is single-shape or mixed-shape, since a cell type may have different constituent face types.

◆ CellToNodeConnectivity

template<Topology TOPO>
using axom::mint::UnstructuredMesh< TOPO >::CellToNodeConnectivity = ConnectivityArray<topology_traits<TOPO>::cell_to_nodes>

Constructor & Destructor Documentation

◆ UnstructuredMesh() [1/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( )
delete

Default constructor. Disabled.

◆ UnstructuredMesh() [2/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( int  ndims,
CellType  cell_type,
IndexType  node_capacity = USE_DEFAULT,
IndexType  cell_capacity = USE_DEFAULT 
)
inline

Constructs an Unstructured single topology mesh.

Parameters
[in]ndimsthe number of dimensions.
[in]cell_typethe cell type of the mesh.
[in]node_capacitythe number of nodes to allocate space for.
[in]cell_capacitythe number of cells to allocate space for.
Note
This constructor is only active when TOPO == SINGLE_SHAPE.
Postcondition
getCellType() == cell_type
getNumberOfNodes() == 0
getNumberOfCells() == 0

References AXOM_STATIC_ASSERT_MSG, axom::mint::PRISM, axom::mint::PYRAMID, axom::mint::SINGLE_SHAPE, and SLIC_ERROR_IF.

◆ UnstructuredMesh() [3/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( int  ndims,
IndexType  node_capacity = USE_DEFAULT,
IndexType  cell_capacity = USE_DEFAULT,
IndexType  connectivity_capacity = USE_DEFAULT 
)
inline

Constructs an Unstructured mixed topology mesh.

Parameters
[in]ndimsthe number of dimensions.
[in]node_capacitythe number of nodes to allocate space for.
[in]cell_capacitythe number of cells to allocate space for.
[in]connectivity_capacitythe number of vertices to allocate space for in the cell connectivity array.
Note
This constructor is only active when TOPO == MIXED_SHAPE.
Postcondition
getCellType() == UNDEFINED_CELL
getNumberOfNodes() == 0
getNumberOfCells() == 0

References AXOM_STATIC_ASSERT_MSG, axom::mint::Mesh::m_has_mixed_topology, and axom::mint::MIXED_SHAPE.

◆ UnstructuredMesh() [4/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( CellType  cell_type,
IndexType  n_cells,
IndexType  cell_capacity,
IndexType connectivity,
IndexType  n_nodes,
IndexType  node_capacity,
double *  x,
double *  y = nullptr,
double *  z = nullptr 
)
inline

Constructs an Unstructured single topology mesh using the provided external buffers.

Parameters
[in]cell_typethe cell type of the mesh.
[in]n_cellsthe number of cells in the mesh.
[in]cell_capacitymax number of cells the mesh is able to hold.
[in]connectivitythe cell connectivity array.
[in]n_nodesthe number of nodes in the mesh.
[in]node_capacitymax number of nodes the mesh is able to hold
[in]xpointer to the x-coordinates
[in]ypointer to the y-coordinates (required only for 2D and 3D)
[in]zpointer to the z-coordinates (required only for 3D)
Note
The length of the connectivity array must be at least cell_capacity * getCellInfo( cell_type ).num_nodes.
The provided coordinate arrays have to be of length at least node_capacity.
This constructor is only supported when TOPO == SINGLE_SHAPE.
Postcondition
getCellType() == cell_type
getNumberOfCells() == n_cells
getCellCapacity == cell_capacity
getNumberOfNodes() == n_nodes
getNodeCapacity() == node_capacity
isExternal() == true

References AXOM_STATIC_ASSERT_MSG, axom::mint::Mesh::m_ndims, axom::mint::PRISM, axom::mint::PYRAMID, axom::mint::SINGLE_SHAPE, SLIC_ASSERT, and SLIC_ERROR_IF.

◆ UnstructuredMesh() [5/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( CellType  cell_type,
IndexType  n_cells,
IndexType connectivity,
IndexType  n_nodes,
double *  x,
double *  y = nullptr,
double *  z = nullptr 
)
inline

Constructs an Unstructured single topology mesh using the provided external buffers.

Parameters
[in]cell_typethe cell type of the mesh
[in]n_cellsthe number of cells in the mesh
[in]connectivitythe cell connectivity array.
[in]n_nodesthe number of nodes in the mesh
[in]xpointer to the x-coordinates
[in]ypointer to the y-coordinates (required only for 2D or 3D)
[in]zpointer to the z-coordinates (required only for 3D)
Note
This constructor is only supported when TOPO == SINGLE_SHAPE.
Postcondition
getCellType() == cell_type
getNumberOfCells() == n_cells
getCellCapacity == n_cells
getNumberOfNodes() == n_nodes
getNodeCapacity() == n_nodes
isExternal() == true

◆ UnstructuredMesh() [6/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( IndexType  n_cells,
IndexType  cell_capacity,
IndexType  connectivity_capacity,
IndexType connectivity,
IndexType offsets,
CellType types,
IndexType  n_nodes,
IndexType  node_capacity,
double *  x,
double *  y = nullptr,
double *  z = nullptr 
)
inline

Constructs an Unstructured mixed topology mesh using the provided external buffers.

Parameters
[in]n_cellsthe number of cells in the mesh.
[in]cell_capacitymax number of cells the mesh is able to hold
[in]connectivity_capacitymax capacity of the connectivity array
[in]connectivitythe connectivity array.
[in]offsetsarray of cell offsets (of length cell_capacity + 1)
[in]typesarray of cell types (of length cell_capacity)
[in]n_nodesthe number of nodes in the mesh.
[in]node_capacitymax number of nodes the mesh can hold
[in]xpointer to the x-coordinates
[in]ypointer to the y-coordinates (required only for 2D and 3D)
[in]zpointer to the z-coordinates (required only 3D)
Note
The supplied connectivity array must have a length that is at least equal to the specified connectivity_capacity.
the provided coordinate arrays are to be of length at least node_capacity.
This constructor is only supported when TOPO == MIXED_SHAPE.
Postcondition
getCellType() == UNDEFINED_CELL
getNumberOfCells() == n_cells
getCellCapacity == cell_capacity
getNumberOfNodes() == n_nodes
getNodeCapacity() == node_capacity
isExternal() == true

References AXOM_STATIC_ASSERT_MSG, axom::mint::Mesh::m_has_mixed_topology, axom::mint::Mesh::m_ndims, axom::mint::MIXED_SHAPE, and SLIC_ASSERT.

◆ UnstructuredMesh() [7/7]

template<Topology TOPO>
axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh ( IndexType  n_cells,
IndexType  connectivity_size,
IndexType connectivity,
IndexType offsets,
CellType types,
IndexType  n_nodes,
double *  x,
double *  y = nullptr,
double *  z = nullptr 
)
inline

Constructs an Unstructured mixed topology mesh using the provided external mesh buffers.

Parameters
[in]n_cellsthe number of cells in the mesh.
[in]connectivity_sizethe size of the connectivity array
[in]connectivitythe connectivity array
[in]offsetsarray of cell offsets (of length n_cells+1)
[in]typesarray of cell types (of length n_cells)
[in]n_nodesthe number of nodes in the mesh
[in]xpointer to the x-coordinates
[in]ypointer to the y-coordinates (required only for 2D and 3D)
[in]zpointer to the z-coordinates (required only for 3D)
Note
The supplied connectivity array must have a length that is at least equal to the specified connectivity_capacity.
the provided coordinate arrays are to be of length at least node_capacity.
Postcondition
getCellType() == UNDEFINED_CELL
getNumberOfCells() == n_cells
getCellCapacity == n_cells
getNumberOfNodes() == n_nodes
getNodeCapacity() == n_cells
isExternal() == true

◆ ~UnstructuredMesh()

template<Topology TOPO>
virtual axom::mint::UnstructuredMesh< TOPO >::~UnstructuredMesh ( )
inlinevirtual

Destructor, deletes the MeshCoordinates and ConnectivityArray.

Member Function Documentation

◆ getNumberOfCells()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfCells ( ) const
inlinefinaloverridevirtual

Return the number of cells in the mesh.

Implements axom::mint::Mesh.

◆ getCellCapacity()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getCellCapacity ( ) const
inlinefinaloverridevirtual

Return the capacity for cells.

Reimplemented from axom::mint::Mesh.

References axom::mint::ConnectivityArray< TYPE >::getIDCapacity().

◆ getCellType()

template<Topology TOPO>
virtual CellType axom::mint::UnstructuredMesh< TOPO >::getCellType ( IndexType  cellID = -1) const
inlinefinaloverridevirtual

Return the type of the given cell.

Parameters
[in]cellIDthe ID of the cell in question, this parameter is ignored if TOPO == SINGLE_SHAPE. If TOPO == MIXED_SHAPE and no cellID is provided the returned type is UNDEFINED_CELL.
Precondition
0 <= cellID < getNumberOfCells()

Implements axom::mint::Mesh.

References axom::mint::ConnectivityArray< TYPE >::getIDType().

◆ getNumberOfCellNodes()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfCellNodes ( IndexType  cellID = 0) const
inlinefinaloverridevirtual

Return the number of nodes associated with the given cell.

Parameters
[in]cellIDthe ID of the cell in question, this parameter is ignored if TOPO == SINGLE_SHAPE.
Precondition
0 <= cellID < getNumberOfCells()

Implements axom::mint::Mesh.

◆ getCellNodeIDs() [1/4]

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getCellNodeIDs ( IndexType  cellID,
IndexType nodes 
) const
inlinefinaloverridevirtual

Copy the connectivity of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes( cellID ).

Parameters
[in]cellIDthe ID of the cell in question.
[out]nodesthe buffer into which the connectivity is copied.
Returns
The number of nodes for the given cell.
Precondition
nodes != nullptr
0 <= cellID < getNumberOfCells()

References SLIC_ASSERT.

◆ getNumberOfCellFaces() [1/2]

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfCellFaces ( IndexType  cellID = 0) const
inlinefinaloverridevirtual

Return the number of faces associated with the given cell.

Parameters
[in]cellIDthe ID of the cell in question.
Note
Codes must call initializeFaceConnectivity() before calling this method.

References axom::mint::getCellInfo(), axom::mint::UnstructuredMesh< TOPO >::getCellType(), and axom::mint::CellInfo::num_faces.

◆ getCellFaceIDs() [1/4]

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getCellFaceIDs ( IndexType  cellID,
IndexType faces 
) const
inlinefinaloverridevirtual

Copy the face IDs of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellFaces( cellID ).

Parameters
[in]cellIDthe ID of the cell in question
[out]facesthe buffer into which the face IDs are copied.
Returns
The number of faces for the given cell.
Note
Codes must call initializeFaceConnectivity() before calling this method.
Precondition
faces != nullptr
0 <= cellID < getNumberOfCells()

References axom::mint::UnstructuredMesh< TOPO >::getNumberOfCellFaces(), and SLIC_ASSERT.

◆ getNumberOfNodes()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfNodes ( ) const
inlinefinaloverridevirtual

Return the number of nodes in the mesh.

Implements axom::mint::Mesh.

References axom::mint::MeshCoordinates::numNodes().

◆ getNodeCapacity()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNodeCapacity ( ) const
inlinefinaloverridevirtual

Return the capacity for nodes.

Reimplemented from axom::mint::Mesh.

References axom::mint::MeshCoordinates::capacity().

◆ getNode()

template<Topology TOPO>
virtual void axom::mint::UnstructuredMesh< TOPO >::getNode ( IndexType  nodeID,
double *  coords 
) const
inlinefinaloverridevirtual

Copy the coordinates of the given node into the provided buffer.

Parameters
[in]nodeIDthe ID of the node in question.
[in]coordsthe buffer to copy the coordinates into, of length at least getDimension().
Precondition
0 <= nodeID < getNumberOfNodes()
coords != nullptr

Implements axom::mint::Mesh.

References axom::mint::MeshCoordinates::getCoordinates().

◆ getCoordinateArray() [1/2]

template<Topology TOPO>
virtual double* axom::mint::UnstructuredMesh< TOPO >::getCoordinateArray ( int  dim)
inlinefinaloverridevirtual

Return a pointer to the array of nodal coordinates of the given dimension.

Parameters
[in]dimthe dimension to return.
Precondition
0 <= dim < getDimension()

Implements axom::mint::Mesh.

References axom::mint::MeshCoordinates::getCoordinateArray().

◆ getCoordinateArray() [2/2]

template<Topology TOPO>
virtual const double* axom::mint::UnstructuredMesh< TOPO >::getCoordinateArray ( int  dim) const
inlinefinaloverridevirtual

◆ getNumberOfFaces()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfFaces ( ) const
inlinefinaloverridevirtual

Return the number of faces in the mesh.

Note
Codes must call initializeFaceConnectivity() before calling this method.

Implements axom::mint::Mesh.

◆ getFaceCapacity()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getFaceCapacity ( ) const
inlinefinaloverridevirtual

Return the capacity for faces.

Note
Codes must call initializeFaceConnectivity() before calling this method.
Deprecated:
Has no significance, since adding external faces is not supported. Use getNumberOfFaces() instead.

Reimplemented from axom::mint::Mesh.

◆ getFaceType() [1/2]

template<Topology TOPO>
virtual CellType axom::mint::UnstructuredMesh< TOPO >::getFaceType ( IndexType  faceID) const
inlinefinaloverridevirtual

Return the type of the given face.

Parameters
[in]faceIDthe ID of the face in question.
Note
Codes must call initializeFaceConnectivity() before calling this method.

◆ getNumberOfFaceNodes() [1/2]

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfFaceNodes ( IndexType  faceID = 0) const
inlinefinaloverridevirtual

Return the number of nodes associated with the given face.

Parameters
[in]faceIDthe ID of the face in question.
Note
Codes must call initializeFaceConnectivity() before calling this method.

◆ getFaceNodeIDs() [1/4]

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getFaceNodeIDs ( IndexType  faceID,
IndexType nodes 
) const
inlinefinaloverridevirtual

Copy the IDs of the nodes that compose the given face into the provided buffer.

Parameters
[in]faceIDthe ID of the face in question.
[out]nodesthe buffer into which the node IDs are copied, must be of length at least getNumberOfFaceNodes().
Returns
The number of nodes for the given face.

A face with ID faceID will have a normal pointing outward from the first cell it is adjacent to, as returned by getFaceCellIDs(faceID, cellID1, cellID2).

Precondition
nodes != nullptr
0 <= faceID < getNumberOfCells()

References axom::mint::UnstructuredMesh< TOPO >::getNumberOfFaceNodes(), and SLIC_ASSERT.

◆ getFaceCellIDs() [1/2]

template<Topology TOPO>
virtual void axom::mint::UnstructuredMesh< TOPO >::getFaceCellIDs ( IndexType  faceID,
IndexType cellIDOne,
IndexType cellIDTwo 
) const
inlinefinaloverridevirtual

Copy the IDs of the cells adjacent to the given face into the provided indices.

Parameters
[in]faceIDthe ID of the face in question.
[out]cellIDOnethe ID of the first cell.
[out]cellIDTwothe ID of the second cell.
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.
Codes must call initializeFaceConnectivity() before calling this method.
Precondition
0 <= faceID < getNumberOfFaces()

◆ getNumberOfEdges()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getNumberOfEdges ( ) const
inlinefinaloverridevirtual

Return the number of edges in the mesh.

Implements axom::mint::Mesh.

References SLIC_ERROR.

◆ getEdgeCapacity()

template<Topology TOPO>
virtual IndexType axom::mint::UnstructuredMesh< TOPO >::getEdgeCapacity ( ) const
inlinefinaloverridevirtual

Return the capacity for edges.

Reimplemented from axom::mint::Mesh.

References SLIC_ERROR.

◆ isExternal()

template<Topology TOPO>
virtual bool axom::mint::UnstructuredMesh< TOPO >::isExternal ( ) const
inlinefinaloverridevirtual

Return true iff both the connectivity and coordinates are stored in external arrays.

Implements axom::mint::Mesh.

References axom::mint::ConnectivityArray< TYPE >::isExternal(), axom::mint::MeshCoordinates::isExternal(), and SLIC_WARNING.

◆ getCellResizeRatio()

template<Topology TOPO>
double axom::mint::UnstructuredMesh< TOPO >::getCellResizeRatio ( ) const
inline

Return the cell resize ratio.

References axom::mint::ConnectivityArray< TYPE >::getResizeRatio().

◆ setCellResizeRatio()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::setCellResizeRatio ( double  ratio)
inline

Set the cell resize ratio.

Parameters
[in]ratiothe new cell resize ratio.
Postcondition
getCellResizeRatio() == ratio

References axom::mint::CELL_CENTERED, axom::mint::Mesh::m_mesh_fields, axom::mint::ConnectivityArray< TYPE >::setResizeRatio(), and axom::mint::FieldData::setResizeRatio().

◆ getCellNodesSize()

template<Topology TOPO>
IndexType axom::mint::UnstructuredMesh< TOPO >::getCellNodesSize ( ) const
inline

Return the size of the connectivity array.

◆ getCellNodesCapacity()

template<Topology TOPO>
IndexType axom::mint::UnstructuredMesh< TOPO >::getCellNodesCapacity ( ) const
inline

Return the capacity of the connectivity array.

References axom::mint::ConnectivityArray< TYPE >::getValueCapacity().

◆ resizeCells()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::resizeCells ( IndexType  cell_size)
inline

Resizes the cell connectivity array and cell-centered fields of this mesh instance to hold the specified number of cells.

Parameters
[in]cell_sizethe number of cells to resize to.
Postcondition
getNumberOfCells() == cell_size

References axom::mint::CELL_CENTERED, axom::mint::UnstructuredMesh< TOPO >::getNumberOfCellNodes(), axom::mint::Mesh::hasMixedCellTypes(), axom::mint::Mesh::m_mesh_fields, axom::mint::ConnectivityArray< TYPE >::resize(), and axom::mint::FieldData::resize().

◆ reserveCells()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::reserveCells ( IndexType  cell_capacity,
IndexType  connectivity_capacity = USE_DEFAULT 
)
inline

Reserve space for the given number of cells.

Parameters
[in]cell_capacitythe number of cells to reserve space for.
[in]connectivity_capacitythe ammount of space to reserve in the connectivity array. Ignored if TOPO == SINGLE_SHAPE.
Postcondition
getCellCapacity() >= cell_capacity

References axom::mint::CELL_CENTERED, axom::mint::Mesh::m_mesh_fields, axom::mint::ConnectivityArray< TYPE >::reserve(), and axom::mint::FieldData::reserve().

◆ shrinkCells()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::shrinkCells ( )
inline

◆ getNodeResizeRatio()

template<Topology TOPO>
double axom::mint::UnstructuredMesh< TOPO >::getNodeResizeRatio ( ) const
inline

Return the node resize ratio.

References axom::mint::MeshCoordinates::getResizeRatio().

◆ setNodeResizeRatio()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::setNodeResizeRatio ( double  ratio)
inline

Set the node resize ratio.

Parameters
[in]ratiothe new node resize ratio.
Postcondition
getNodeResizeRatio() == ratio

References axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, axom::mint::FieldData::setResizeRatio(), and axom::mint::MeshCoordinates::setResizeRatio().

◆ resizeNodes()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::resizeNodes ( IndexType  nodes_size)
inline

Resizes the nodal coordinates and fields of this mesh instance to the specified number of nodes.

Parameters
[in]nodes_sizethe number of nodes to resize to.
Postcondition
getNumberOfNodes() == nodes_size

References axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, axom::mint::FieldData::resize(), and axom::mint::MeshCoordinates::resize().

◆ reserveNodes()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::reserveNodes ( IndexType  node_capacity)
inline

Reserve space for the given number of nodes.

Parameters
[in]node_capacitythe number of nodes to reserve space for.
Postcondition
getNodeCapacity() >= node_capacity

References axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, axom::mint::MeshCoordinates::reserve(), and axom::mint::FieldData::reserve().

◆ shrinkNodes()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::shrinkNodes ( )
inline

◆ getFaceResizeRatio()

template<Topology TOPO>
double axom::mint::UnstructuredMesh< TOPO >::getFaceResizeRatio ( ) const
inline

Return the face resize ratio.

◆ getFaceNodesSize()

template<Topology TOPO>
IndexType axom::mint::UnstructuredMesh< TOPO >::getFaceNodesSize ( ) const
inline

Return the size of the connectivity array.

◆ getFaceNodesCapacity()

template<Topology TOPO>
IndexType axom::mint::UnstructuredMesh< TOPO >::getFaceNodesCapacity ( ) const
inline

Return the capacity of the connectivity array.

Deprecated:
Has no significance, since adding external faces is not supported. Use getFaceNodesSize() instead.

◆ getEdgeResizeRatio()

template<Topology TOPO>
double axom::mint::UnstructuredMesh< TOPO >::getEdgeResizeRatio ( ) const
inline

Return the edge resize ratio.

References SLIC_ERROR.

◆ resize()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::resize ( IndexType  node_size,
IndexType  cell_size 
)
inline

Resizes this mesh instance to the specified number of nodes & cells.

Parameters
[in]node_sizethe desired number of nodes
[in]cell_sizethe desired number of cells
Note
This method will also resize the node-centered and cell-centered fields accordingly.
Postcondition
getNumberOfNodes() == nodes_size
getNumberOfCells() == cell_size
See also
resizeNodes()
resizeCells()

References axom::mint::UnstructuredMesh< TOPO >::resizeCells(), and axom::mint::UnstructuredMesh< TOPO >::resizeNodes().

◆ reserve()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::reserve ( IndexType  node_capacity,
IndexType  cell_capacity,
IndexType  connectivity_capacity = USE_DEFAULT 
)
inline

Reserve space for the given number of nodes and cells.

Parameters
[in]node_capacitythe number of nodes to reserve space for.
[in]cell_capacitythe number of cells to reserve space for.
[in]connectivity_capacitythe ammount of space to reserve in the connectivity array. Ignored if TOPO == SINGLE_SHAPE.
Postcondition
getNodeCapacity() >= node_capacity
getCellCapacity() >= cell_capacity

References axom::mint::UnstructuredMesh< TOPO >::reserveCells(), and axom::mint::UnstructuredMesh< TOPO >::reserveNodes().

◆ shrink()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::shrink ( )
inline

Shrink the node capacity to be equal to the number of nodes and the cell capacity to be equal to the number of cells.

Postcondition
getNodeCapacity() == getNumberOfNodes()
getCellCapacity() == getNumberOfCells()
getCellNodesCapacity() == getCellNodesSize()

References axom::mint::UnstructuredMesh< TOPO >::shrinkCells(), and axom::mint::UnstructuredMesh< TOPO >::shrinkNodes().

◆ empty()

template<Topology TOPO>
bool axom::mint::UnstructuredMesh< TOPO >::empty ( ) const
inline

Return true iff the mesh holds no nodes and no cells.

References axom::mint::ConnectivityArray< TYPE >::empty(), and axom::mint::MeshCoordinates::empty().

◆ isInSidre()

template<Topology TOPO>
bool axom::mint::UnstructuredMesh< TOPO >::isInSidre ( ) const
inline

Return true iff both the connectivity and coordinates are stored in sidre.

References axom::mint::ConnectivityArray< TYPE >::isInSidre(), axom::mint::MeshCoordinates::isInSidre(), and SLIC_WARNING.

◆ getCellNodeIDs() [2/4]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodeIDs ( IndexType  cellID)
inline

Return a pointer to the connectivity of the given cell. The buffer is guarenteed to be of length at least getNumberOfCellNodes( cellID ).

Parameters
[in]cellIDthe ID of the cell in question.
Precondition
0 <= cellID < getNumberOfCells()

◆ getCellNodeIDs() [3/4]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodeIDs ( IndexType  cellID) const
inline

◆ getCellFaceIDs() [2/4]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFaceIDs ( IndexType  cellID)
inline

Return a pointer to the faces of the given cell. The buffer is guarenteed to be of length at least getNumberOfCellFaces( cellID ).

Parameters
[in]cellIDthe ID of the cell in question.
Note
Codes must call initializeFaceConnectivity() before calling this method.
Precondition
0 <= cellID < getNumberOfCells()

◆ getCellFaceIDs() [3/4]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFaceIDs ( IndexType  cellID) const
inline

◆ getCellNodesArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodesArray ( )
inline

Return a pointer to the cell nodes array, of length getCellNodesSize().

◆ getCellNodesArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodesArray ( ) const
inline

◆ getCellNodesOffsetsArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodesOffsetsArray ( )
inline

Return a pointer to the cell nodes offset array, of length getNumberOfCells() + 1. Returns nullptr if TOPO == SINGLE_SHAPE.

◆ getCellNodesOffsetsArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellNodesOffsetsArray ( ) const
inline

◆ getCellTypesArray() [1/2]

template<Topology TOPO>
CellType* axom::mint::UnstructuredMesh< TOPO >::getCellTypesArray ( )
inline

Return a pointer to the cell types array, of length getNumberOfCells(). Returns nullptr if TOPO == SINGLE_SHAPE.

References axom::mint::ConnectivityArray< TYPE >::getTypePtr().

◆ getCellTypesArray() [2/2]

template<Topology TOPO>
const CellType* axom::mint::UnstructuredMesh< TOPO >::getCellTypesArray ( ) const
inline

◆ getCellFacesArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFacesArray ( )
inline

Return a pointer to the cell faces array, of length getCellNodesSize().

◆ getCellFacesArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFacesArray ( ) const
inline

◆ getCellFacesOffsetsArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFacesOffsetsArray ( )
inline

Return a pointer to the cell faces offset array, of length getNumberOfCells() + 1.

◆ getCellFacesOffsetsArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getCellFacesOffsetsArray ( ) const
inline

◆ appendCell()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::appendCell ( const IndexType connec,
CellType  type = UNDEFINED_CELL 
)
inline

Append a cell to the mesh.

Parameters
[in]connecthe connectivity of the new cell.
[in]typethe type of the new cell, ignored if TOPO == SINGLE_SHAPE.
Precondition
connec != nullptr

References axom::mint::ConnectivityArray< TYPE >::append(), axom::mint::CELL_CENTERED, axom::mint::getCellInfo(), axom::mint::UnstructuredMesh< TOPO >::getNumberOfCells(), axom::mint::Mesh::m_mesh_fields, axom::mint::CellInfo::num_nodes, axom::mint::FieldData::resize(), and axom::mint::UNDEFINED_CELL.

◆ appendCells()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::appendCells ( const IndexType connec,
IndexType  n_cells,
const IndexType offsets = nullptr,
const CellType types = nullptr 
)
inline

Append multiple cells to the mesh.

Parameters
[in]connecthe connectivity of the new cells.
[in]n_cellsthe number of cells to append.
[in]offsetsthe offsets array of the cells to append, ignored if TOPO == SINGLE_SHAPE.
[in]typesthe types array of the new cells, ignored if TOPO == SINGLE_SHAPE.
Precondition
connec != nullptr
n_cells >= 0

References axom::mint::ConnectivityArray< TYPE >::appendM(), axom::mint::CELL_CENTERED, axom::mint::UnstructuredMesh< TOPO >::getNumberOfCells(), axom::mint::Mesh::m_mesh_fields, and axom::mint::FieldData::resize().

◆ insertCell()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertCell ( const IndexType connec,
IndexType  ID,
CellType  type = UNDEFINED_CELL 
)
inline

Insert a cell in to the mesh at the given position.

Parameters
[in]connecthe connectivity of the new cell.
[in]IDthe position to insert at.
[in]n_valuesthe number of values in the connectivity, ignored if TOPO == SINGLE_SHAPE.
[in]typethe type of the new cells, ignored if TOPO == SINGLE_SHAPE.
Precondition
connec != nullptr
0 <= ID <= getNumberOfCells()

References axom::mint::CELL_CENTERED, axom::mint::FieldData::emplace(), axom::mint::getCellInfo(), axom::mint::ConnectivityArray< TYPE >::insert(), axom::mint::Mesh::m_mesh_fields, axom::mint::CellInfo::num_nodes, and axom::mint::UNDEFINED_CELL.

◆ insertCells()

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertCells ( const IndexType connec,
IndexType  start_ID,
IndexType  n_cells,
const IndexType offsets = nullptr,
const CellType types = nullptr 
)
inline

Insert multiple cells in to the mesh at the given position.

Parameters
[in]connecthe connectivity of the new cells.
[in]start_IDthe position to insert at.
[in]n_cellsthe number of cells to insert
[in]offsetsthe offsets array of the cells to append, ignored if TOPO == SINGLE_SHAPE.
[in]typesthe types array of the new cells, ignored if TOPO == SINGLE_SHAPE.
Precondition
connec != nullptr
0 <= start_ID <= getNumberOfCells()

References axom::mint::CELL_CENTERED, axom::mint::FieldData::emplace(), axom::mint::ConnectivityArray< TYPE >::insertM(), and axom::mint::Mesh::m_mesh_fields.

◆ getNodeCoordinate()

template<Topology TOPO>
double axom::mint::UnstructuredMesh< TOPO >::getNodeCoordinate ( IndexType  nodeID,
int  dim 
) const
inline

Return the coordinate of the given dimension of the given node.

Parameters
[in]nodeIDthe ID of the node in question.
[in]dimthe dimension to return.
Precondition
0 <= nodeID < getNumberOfNodes()
0 <= dim < getDimension()

References axom::mint::MeshCoordinates::getCoordinate().

◆ appendNode() [1/3]

template<Topology TOPO>
IndexType axom::mint::UnstructuredMesh< TOPO >::appendNode ( double  x)
inline

Appends a new node to the mesh.

Parameters
[in]xthe first coordinate to append.
[in]ythe second coordinate to append.
[in]zthe third coordinate to append.
Note
Each method is valid only for the appropriate dimension of the mesh.

References axom::mint::MeshCoordinates::append(), axom::mint::UnstructuredMesh< TOPO >::getNumberOfNodes(), axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, and axom::mint::FieldData::resize().

◆ appendNode() [2/3]

◆ appendNode() [3/3]

◆ appendNodes() [1/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::appendNodes ( const double *  coords,
IndexType  n = 1 
)
inline

Appends multiple nodes to the mesh.

Parameters
[in]coordspointer to the nodes to append, of length n * getDimension().
[in]nthe number of nodes to append.
Note
coords is assumed to be in the array of structs format, ie coords = {x0, y0, z0, x1, y1, z1, ..., xn, yn, zn}.
Precondition
coords != nullptr
n >= 0

References axom::mint::MeshCoordinates::append(), axom::mint::UnstructuredMesh< TOPO >::getNumberOfNodes(), axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, and axom::mint::FieldData::resize().

◆ appendNodes() [2/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::appendNodes ( const double *  x,
const double *  y,
IndexType  n 
)
inline

Appends new nodes to the mesh.

Parameters
[in]xarray of the first coordinates to append, of length n.
[in]yarray of the second coordinates to append, of length n.
[in]zarray of the third coordinates to append, of length n.
[in]nthe number of coordinates to append.
Note
The first method is only valid for 2D meshes while the second is only for 3D.
Precondition
x != nullptr
y != nullptr
z != nullptr
n >= 0

References axom::mint::MeshCoordinates::append(), axom::mint::UnstructuredMesh< TOPO >::getNumberOfNodes(), axom::mint::Mesh::m_mesh_fields, axom::mint::NODE_CENTERED, and axom::mint::FieldData::resize().

◆ appendNodes() [3/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::appendNodes ( const double *  x,
const double *  y,
const double *  z,
IndexType  n 
)
inline

◆ insertNode() [1/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNode ( IndexType  nodeID,
double  x,
bool  update_connectivity = true 
)
inline

Insert a node to the mesh.

Parameters
[in]nodeIDthe position to insert at.
[in]xthe value of the first coordinate to insert.
[in]ythe value of the second coordinate to insert.
[in]zthe value of the third coordinate to insert.
[in]update_connectivityif true will update the connectivity so that all elements remain connected to the same coordinates as before.
Note
Each method is valid only for the appropriate dimension of the mesh.
Precondition
0 <= nodeID <= getNumberOfNodes

References axom::mint::FieldData::emplace(), axom::mint::MeshCoordinates::insert(), axom::mint::Mesh::m_mesh_fields, and axom::mint::NODE_CENTERED.

◆ insertNode() [2/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNode ( IndexType  nodeID,
double  x,
double  y,
bool  update_connectivity = true 
)
inline

◆ insertNode() [3/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNode ( IndexType  nodeID,
double  x,
double  y,
double  z,
bool  update_connectivity = true 
)
inline

◆ insertNodes() [1/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNodes ( IndexType  nodeID,
const double *  coords,
IndexType  n = 1,
bool  update_connectivity = true 
)
inline

Inserts multiple nodes to the mesh.

Parameters
[in]coordspointer to the nodes to insert, of length n * getDimension().
[in]nthe number of nodes to append.
[in]update_connectivityif true will update the connectivity so that all elements remain connected to the same coordinates as before.
Note
coords is assumed to be in the array of structs format, ie coords = {x0, y0, z0, x1, y1, z1, ..., xn, yn, zn}.
Precondition
0 <= nodeID <= getNumberOfNodes
coords != nullptr
n >= 0

References axom::mint::FieldData::emplace(), axom::mint::MeshCoordinates::insert(), axom::mint::Mesh::m_mesh_fields, and axom::mint::NODE_CENTERED.

◆ insertNodes() [2/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNodes ( IndexType  nodeID,
const double *  x,
const double *  y,
IndexType  n,
bool  update_connectivity = true 
)
inline

Insert multiple nodes to the mesh.

Parameters
[in]nodeIDthe position to insert at.
[in]xthe array of the first coordinates to insert.
[in]ythe array of the second coordinates to insert.
[in]zthe array of the third coordinates to insert.
[in]nthe number of nodes to insert.
[in]update_connectivityif true will update the connectivity so that all elements remain connected to the same coordinates as before.
Note
The first method is only valid for 2D meshes while the second is only for 3D.
Precondition
0 <= nodeID <= getNumberOfNodes
x != nullptr
y != nullptr if 2-D or 3-D
z != nullptr if 3-D
n >= 0

References axom::mint::FieldData::emplace(), axom::mint::MeshCoordinates::insert(), axom::mint::Mesh::m_mesh_fields, and axom::mint::NODE_CENTERED.

◆ insertNodes() [3/3]

template<Topology TOPO>
void axom::mint::UnstructuredMesh< TOPO >::insertNodes ( IndexType  nodeID,
const double *  x,
const double *  y,
const double *  z,
IndexType  n,
bool  update_connectivity = true 
)
inline

◆ initializeFaceConnectivity()

template<Topology TOPO>
bool axom::mint::UnstructuredMesh< TOPO >::initializeFaceConnectivity ( bool  force = false)
inline

Sets up cell-face, face-cell, and face-node connectivity.

Parameters
[in]forcere-initialize face-related connectivity, even if it has already been done.

References axom::mint::FACE_CENTERED, axom::mint::Mesh::getDimension(), axom::mint::UnstructuredMesh< TOPO >::getNumberOfFaces(), axom::mint::Mesh::m_mesh_fields, and axom::mint::FieldData::resize().

◆ getFaceNodeIDs() [2/4]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodeIDs ( IndexType  faceID)
inline

Return a pointer to the nodes of the given face. The buffer is guaranteed to be of length at least getNumberOfFaceNodes( faceID ).

Parameters
[in]faceIDthe ID of the face in question.
Note
Codes must call initializeFaceConnectivity() before calling this method.
Precondition
0 <= faceID < getNumberOfFaces()

◆ getFaceNodeIDs() [3/4]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodeIDs ( IndexType  faceID) const
inline

◆ getFaceNodesArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodesArray ( )
inline

Return a pointer to the face nodes array, of length getFaceNodesSize().

◆ getFaceNodesArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodesArray ( ) const
inline

◆ getFaceNodesOffsetsArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodesOffsetsArray ( )
inline

Return a pointer to the face nodes offset array, of length getNumberOfFaces() + 1.

◆ getFaceNodesOffsetsArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceNodesOffsetsArray ( ) const
inline

◆ getFaceCellsArray() [1/2]

template<Topology TOPO>
IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceCellsArray ( )
inline

Return a pointer to the face cells array, of length 2 * getNumberOfFaces().

◆ getFaceCellsArray() [2/2]

template<Topology TOPO>
const IndexType* axom::mint::UnstructuredMesh< TOPO >::getFaceCellsArray ( ) const
inline

◆ getCellNodeIDs() [4/4]

virtual IndexType axom::mint::Mesh::getCellNodeIDs ( IndexType   AXOM_UNUSED_PARAMcellID,
IndexType AXOM_UNUSED_PARAMnodes 
) const
pure virtualinherited

Copy the connectivity of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes( cellID ).

Parameters
[in]cellIDthe ID of the cell in question.
[out]nodesthe buffer into which the connectivity is copied, must be of length at least getNumberOfCellNodes( cellID ).
Returns
The number of nodes for the given cell.
Precondition
nodes != nullptr
0 <= cellID < getNumberOfCells()

◆ getNumberOfCellFaces() [2/2]

virtual IndexType axom::mint::Mesh::getNumberOfCellFaces ( IndexType   AXOM_UNUSED_PARAMcellID = 0) const
pure virtualinherited

Return the number of faces associated with the given cell.

Parameters
[in]cellIDthe ID of the cell in question.

Implemented in axom::mint::StructuredMesh, and axom::mint::ParticleMesh.

◆ getCellFaceIDs() [4/4]

virtual IndexType axom::mint::Mesh::getCellFaceIDs ( IndexType   AXOM_UNUSED_PARAMcellID,
IndexType AXOM_UNUSED_PARAMfaces 
) const
pure virtualinherited

Populates the given buffer with the IDs of the faces of the given cell and returns the number of faces.

Parameters
[in]cellIDthe ID of the cellID in question.
[out]facesbuffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces( cellID ).
Precondition
faces != nullptr
0 <= cellID < getNumberOfCells()

Implemented in axom::mint::ParticleMesh.

◆ getFaceType() [2/2]

virtual CellType axom::mint::Mesh::getFaceType ( IndexType   AXOM_UNUSED_PARAMfaceID) const
pure virtualinherited

Return the type of the given face.

Parameters
[in]faceIDthe ID of the face in question.

Implemented in axom::mint::StructuredMesh, and axom::mint::ParticleMesh.

◆ getNumberOfFaceNodes() [2/2]

virtual IndexType axom::mint::Mesh::getNumberOfFaceNodes ( IndexType   AXOM_UNUSED_PARAMfaceID) const
pure virtualinherited

Return the number of nodes associated with the given face.

Parameters
[in]faceIDthe ID of the face in question.

Implemented in axom::mint::StructuredMesh, and axom::mint::ParticleMesh.

◆ getFaceNodeIDs() [4/4]

virtual IndexType axom::mint::Mesh::getFaceNodeIDs ( IndexType   AXOM_UNUSED_PARAMfaceID,
IndexType AXOM_UNUSED_PARAMnodes 
) const
pure virtualinherited

Copy the IDs of the nodes that compose the given face into the provided buffer.

Parameters
[in]faceIDthe ID of the face in question.
[out]nodesthe buffer into which the node IDs are copied, must be of length at least getNumberOfFaceNodes().
Returns
The number of nodes for the given face.
Precondition
nodes != nullptr
0 <= faceID < getNumberOfFaces()

Implemented in axom::mint::ParticleMesh.

◆ getFaceCellIDs() [2/2]

virtual void axom::mint::Mesh::getFaceCellIDs ( IndexType   AXOM_UNUSED_PARAMfaceID,
IndexType AXOM_UNUSED_PARAMcellIDOne,
IndexType AXOM_UNUSED_PARAMcellIDTwo 
) const
pure virtualinherited

Copy the IDs of the cells adjacent to the given face into the provided indices.

Parameters
[in]faceIDthe ID of the face in question.
[out]cellIDOnethe ID of the first cell.
[out]cellIDTwothe ID of the second cell.
Note
If no cell exists (the face is external) then the ID will be set to -1.
Precondition
0 <= faceID < getNumberOfFaces()

Implemented in axom::mint::ParticleMesh.

◆ getDimension()

int axom::mint::Mesh::getDimension ( ) const
inlineinherited

Returns the dimension for this mesh instance.

Returns
ndims the dimension of this mesh instance.
Postcondition
ndims >= 1 && ndims <= 3

References axom::mint::Mesh::m_ndims.

◆ getBlockId()

int axom::mint::Mesh::getBlockId ( ) const
inlineinherited

Returns the ID of this mesh instance.

Returns
Id the ID of the mesh.

References axom::mint::Mesh::m_block_idx.

◆ setBlockId()

void axom::mint::Mesh::setBlockId ( int  ID)
inherited

set the block ID of this mesh instance.

Parameters
[in]IDthe new block ID.
Postcondition
getBlockId() == ID

◆ getPartitionId()

int axom::mint::Mesh::getPartitionId ( ) const
inlineinherited

Returns the partition ID of this mesh instance.

Returns
partitionId the partition ID of the mesh.

References axom::mint::Mesh::m_part_idx.

◆ setPartitionId()

void axom::mint::Mesh::setPartitionId ( int  ID)
inherited

set the partition ID of this mesh instance.

Parameters
[in]IDthe new partition ID.
Postcondition
getPartitionId() == ID

◆ getMeshType()

int axom::mint::Mesh::getMeshType ( ) const
inlineinherited

Returns the mesh type of this mesh instance.

Returns
meshType the mesh type
See also
MeshType

References axom::mint::Mesh::m_type.

◆ hasExplicitCoordinates()

bool axom::mint::Mesh::hasExplicitCoordinates ( ) const
inlineinherited

Checks if this mesh instance has explicit coordinates.

Returns
status true iff the mesh defines coordinates explicitly.

References axom::mint::Mesh::m_explicit_coords.

◆ hasExplicitConnectivity()

bool axom::mint::Mesh::hasExplicitConnectivity ( ) const
inlineinherited

Checks if this mesh instance has explicit connectivity.

Returns
status true iff the mesh defines cell connectivity explicitly.

References axom::mint::Mesh::m_explicit_connectivity.

◆ hasMixedCellTypes()

bool axom::mint::Mesh::hasMixedCellTypes ( ) const
inlineinherited

Checks if the mesh has mixed cell types, e.g., consisting of both triangle and quad elements or hex,pyramid,prisms and tets in 3-D.

Returns
status true iff the mesh has mixed cell types.

References axom::mint::Mesh::m_has_mixed_topology.

◆ isStructured()

bool axom::mint::Mesh::isStructured ( ) const
inlineinherited

Returns true if the mesh type is structured.

Returns
status true if the mesh type is structured, else, false.

References axom::mint::Mesh::m_type, axom::mint::STRUCTURED_CURVILINEAR_MESH, axom::mint::STRUCTURED_RECTILINEAR_MESH, and axom::mint::STRUCTURED_UNIFORM_MESH.

◆ isUnstructured()

bool axom::mint::Mesh::isUnstructured ( ) const
inlineinherited

Returns true if the mesh type is unstructured.

Returns
status true if the mesh type is unstructured, else, false.

References axom::mint::Mesh::m_type, and axom::mint::UNSTRUCTURED_MESH.

◆ hasSidreGroup()

bool axom::mint::Mesh::hasSidreGroup ( ) const
inlineinherited

Checks if this Mesh instance is associated with a Sidre Group.

Returns
status true if the Mesh is associated with a group in a Sidre hierarchy, else, false.

◆ getFieldData()

const FieldData * axom::mint::Mesh::getFieldData ( int  association) const
inlineinherited

Returns const pointer to the FieldData instance with the specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc.

Parameters
[in]associationthe specified mesh field association
Returns
fd pointer to the requested FieldData instance
Precondition
association >= 0 && association < NUM_FIELD_ASSOCIATION
Postcondition
fd != nullptr
See also
FieldAssociation
FieldData

References axom::mint::Mesh::m_mesh_fields, axom::mint::Mesh::m_type, axom::mint::NODE_CENTERED, axom::mint::NUM_FIELD_ASSOCIATIONS, axom::mint::PARTICLE_MESH, and SLIC_ERROR_IF.

◆ hasField()

bool axom::mint::Mesh::hasField ( const std::string &  name,
int  association = ANY_CENTERING 
) const
inlineinherited

Check if a field with the given name and association exists.

Parameters
[in]namethe name of the field in query.
[in]associationthe field association (optional)
Returns
status true if the field exists, else, false.
Note
If an association is not explicitly specified, the code will check if a field by the given name exists in any available centeering.
Precondition
name.empty()==false
association >= 0 && association < NUM_FIELD_ASSOCIATION
See also
FieldAssociation

References axom::mint::ANY_CENTERING, axom::mint::Mesh::getFieldData(), axom::mint::FieldData::hasField(), axom::mint::Mesh::m_type, axom::mint::NUM_FIELD_ASSOCIATIONS, axom::mint::PARTICLE_MESH, and SLIC_ASSERT.

◆ createField() [1/2]

template<typename T >
T * axom::mint::Mesh::createField ( const std::string &  name,
int  association,
IndexType  num_components = 1,
bool  storeInSidre = true 
)
inlineinherited

Creates a new field with the given name and specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc.

Parameters
[in]namethe name of the new field.
[in]associationthe mesh field association.
[in]num_componentsnumber of components of the field (optional).
[in]storeInSidreindicates whether to store the field in the corresponding Sidre group (optional).
[in]capacity
Returns
ptr raw pointer to the data buffer of the new field.
Note
This method throws an error and aborts if any of the pre-conditions is not satisfied.
Precondition
name.empty() == false
hasField( name ) == false
association >= 0 && association < NUM_FIELD_ASSOCIATION
Postcondition
ptr != nullptr
hasField( name ) == true
See also
FieldAssociation

References axom::mint::FieldData::createField(), axom::mint::Mesh::getFieldData(), axom::mint::Mesh::hasField(), SLIC_ASSERT, and SLIC_ERROR_IF.

◆ createField() [2/2]

template<typename T >
T * axom::mint::Mesh::createField ( const std::string &  name,
int  association,
T *  data,
IndexType  num_components = 1,
IndexType  capacity = USE_DEFAULT 
)
inlineinherited

Creates a new field from an external buffer that has the given name and specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc.

Parameters
[in]namethe name of the new field.
[in]associationthe mesh field association.
[in]datapointer to the external data buffer.
[in]num_componentsnumber of components of the field (optional).
Returns
ptr raw pointer to the data buffer of the new field.
Note
This method throws an error and aborts if any of the pre-conditions is not satisfied.
Precondition
name.empty() == false
hasField( name ) == false
data != nullptr
association >= 0 && association < NUM_FIELD_ASSOCIATION
Postcondition
ptr != nullptr
ptr == data
hasField( name ) == true
See also
FieldAssociation

References axom::mint::FieldData::createField(), axom::mint::Mesh::getFieldData(), axom::mint::Mesh::hasField(), SLIC_ASSERT, and SLIC_ERROR_IF.

◆ removeField()

bool axom::mint::Mesh::removeField ( const std::string &  name,
int  association 
)
inlineinherited

Removes the field with the given name and specified association.

Parameters
[in]namethe name of the field to remove.
[in]associationthe mesh field association.
Returns
status true if the field is removed successfully, else, false.
Precondition
name.emtpy() == false
association >= 0 && association < NUM_FIELD_ASSOCIATION
See also
FieldAssociation

References axom::mint::Mesh::getFieldData(), axom::mint::FieldData::hasField(), axom::mint::Mesh::hasField(), axom::mint::FieldData::removeField(), and SLIC_WARNING_IF.

◆ getFieldPtr() [1/4]

template<typename T >
T * axom::mint::Mesh::getFieldPtr ( const std::string &  name,
int  association,
IndexType num_components 
)
inlineinherited

Returns pointer to buffer of the field with the given ane and specified mesh field association.

Parameters
[in]namethe name of the requested field.
[in]associationthe mesh field association.
[out]num_componentsthe number of components per tuple (optional).
Returns
ptr raw pointer to the data buffer of the requested field.
Precondition
name.empty() == false
hasField( name )
association >= 0 && association < NUM_FIELD_ASSOCIATION
See also
FieldAssociation

References axom::mint::Mesh::getFieldPtr().

◆ getFieldPtr() [2/4]

template<typename T >
T * axom::mint::Mesh::getFieldPtr ( const std::string &  name,
int  association 
)
inlineinherited

◆ getFieldPtr() [3/4]

template<typename T >
const T * axom::mint::Mesh::getFieldPtr ( const std::string &  name,
int  association,
IndexType num_components 
) const
inlineinherited

◆ getFieldPtr() [4/4]

template<typename T >
const T * axom::mint::Mesh::getFieldPtr ( const std::string &  name,
int  association 
) const
inlineinherited

Member Data Documentation

◆ m_ndims

int axom::mint::Mesh::m_ndims
protectedinherited

◆ m_type

int axom::mint::Mesh::m_type
protectedinherited

mesh dimension

◆ m_block_idx

int axom::mint::Mesh::m_block_idx
protectedinherited

the type of the mesh

◆ m_part_idx

int axom::mint::Mesh::m_part_idx
protectedinherited

the Block ID of the mesh

◆ m_explicit_coords

bool axom::mint::Mesh::m_explicit_coords
protectedinherited

the partition ID of the mesh

◆ m_explicit_connectivity

bool axom::mint::Mesh::m_explicit_connectivity
protectedinherited

◆ m_has_mixed_topology

bool axom::mint::Mesh::m_has_mixed_topology
protectedinherited

◆ m_mesh_fields

FieldData* axom::mint::Mesh::m_mesh_fields[NUM_FIELD_ASSOCIATIONS]
protectedinherited

The documentation for this class was generated from the following file: