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

Base class that defines the core API common for structured mesh types. More...

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

Inheritance diagram for axom::mint::StructuredMesh:

Public Member Functions

 StructuredMesh ()=delete
 Default constructor. Disabled. More...
 
virtual bool isExternal () const override
 Returns true iff the mesh was constructed with external arrays. More...
 
Virtual methods
virtual ~StructuredMesh ()
 Destructor. More...
 
Cells
virtual IndexType getNumberOfCells () const final override
 Return the number of cells in the mesh. More...
 
virtual CellType getCellType (IndexType AXOM_UNUSED_PARAM(cellID)=0) const final override
 Return the type of cell this mesh holds. SEGMENT, QUAD, or HEX depending on the dimension. More...
 
virtual IndexType getNumberOfCellNodes (IndexType AXOM_UNUSED_PARAM(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 node IDs of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes(). More...
 
virtual IndexType getNumberOfCellFaces (IndexType AXOM_UNUSED_PARAM(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
 Returns the IDs of the faces of the cell at (i,j) or (i, j, k). More...
 
const StackArray< IndexType, 8 > & getCellNodeOffsetsArray () const
 Returns the cell node offsets array. More...
 
IndexType getCellNodeIDs (IndexType i, IndexType j, IndexType *nodes) const
 Copy the node IDs of the given cell into the provided buffer. More...
 
IndexType getCellNodeIDs (IndexType i, IndexType j, IndexType k, IndexType *nodes) const
 
IndexType cellJp () const
 Returns stride to the second dimension of cells. More...
 
IndexType cellKp () const
 Returns stride to the third dimension of cells. More...
 
IndexType getCellLinearIndex (IndexType i, IndexType j, IndexType k=0) const
 Returns the linear index corresponding to the given logical grid cell indices. More...
 
void getCellGridIndex (IndexType cellID, IndexType &i, IndexType &j) const
 Given the 1D linear index of a cell, this method computes the corresponding i-j-k grid index. More...
 
void getCellGridIndex (IndexType cellID, IndexType &i, IndexType &j, IndexType &k) const
 
Nodes
virtual IndexType getNumberOfNodes () const final override
 Return the number of nodes in the mesh. More...
 
virtual void getNode (IndexType nodeID, double *node) const override=0
 Copy the coordinates of the given node into the provided buffer. More...
 
virtual double * getCoordinateArray (int dim) override=0
 Returns pointer to the requested mesh coordinate buffer. More...
 
virtual const double * getCoordinateArray (int dim) const override=0
 
IndexType nodeJp () const
 Returns stride to the second dimension of nodes. More...
 
IndexType nodeKp () const
 kp stride to the third dimension of nodes. More...
 
IndexType getNodeLinearIndex (IndexType i, IndexType j, IndexType k=0) const
 Returns the linear index corresponding to the given logical node indices. More...
 
void getNodeGridIndex (IndexType nodeID, IndexType &i, IndexType &j) const
 Given the 1D linear index of a node, this method computes the corresponding i-j-k grid index. More...
 
void getNodeGridIndex (IndexType nodeID, IndexType &i, IndexType &j, IndexType &k) const
 
Faces
virtual IndexType getNumberOfFaces () const final override
 Return the number of faces in the mesh. More...
 
virtual CellType getFaceType (IndexType AXOM_UNUSED_PARAM(faceID)=0) const final override
 Return the type of face this mesh holds. SEGMENT or QUAD depending on the dimension. More...
 
virtual IndexType getNumberOfFaceNodes (IndexType AXOM_UNUSED_PARAM(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...
 
IndexType getIFaceNodeIDs (IndexType faceID, IndexType *nodes) const
 Copy the IDs of the nodes that compose the given face into the provided buffer. More...
 
IndexType getJFaceNodeIDs (IndexType faceID, IndexType *nodes) const
 
IndexType getKFaceNodeIDs (IndexType faceID, IndexType *nodes) const
 
IndexType getFaceLinearIndex (int dir, IndexType i, IndexType j, IndexType k=0) const
 Returns the linear index corresponding to the given logical grid face indices. More...
 
IndexType getIFaceLinearIndex (IndexType i, IndexType j, IndexType k=0) const
 Returns the linear index corresponding to the given logical face indices. More...
 
IndexType getJFaceLinearIndex (IndexType i, IndexType j, IndexType k=0) const
 
IndexType getKFaceLinearIndex (IndexType i, IndexType j, IndexType k=0) const
 
Edges
virtual IndexType getNumberOfEdges () const final override
 Return the number of edges in the mesh. More...
 
void getCellFaceIDs (IndexType i, IndexType j, IndexType *faces) const
 Returns the IDs of the faces of the cell at (i,j) or (i, j, k). More...
 
void getCellFaceIDs (IndexType i, IndexType j, IndexType k, IndexType *faces) const
 
void getIFaceCellIDs (IndexType faceID, IndexType &cellIDOne, IndexType &cellIDTwo) const
 Copy the IDs of the cells adjacent to the given face into the provided indices. More...
 
void getJFaceCellIDs (IndexType faceID, IndexType &cellIDOne, IndexType &cellIDTwo) const
 
void getKFaceCellIDs (IndexType faceID, IndexType &cellIDOne, IndexType &cellIDTwo) const
 
Attribute Querying Methods
IndexType getNodeResolution (IndexType dim) const
 Returns the number of nodes along the given dimension. More...
 
void getExtent (int64 extent[6]) const
 Get the global node extent of the mesh. More...
 
void setExtent (int ndims, const int64 *extent)
 Set the global node extent of the mesh. More...
 
IndexType getCellResolution (IndexType dim) const
 Returns the number of cells along the given dimension. More...
 
IndexType getTotalNumFaces (int direction) const
 Get the total number of I, J, or K faces. More...
 
void getIFaceGridIndex (IndexType faceID, IndexType &i, IndexType &j) const
 Returns the grid indices corresponding to the given linear face index. More...
 
void getIFaceGridIndex (IndexType faceID, IndexType &i, IndexType &j, IndexType &k) const
 
void getJFaceGridIndex (IndexType faceID, IndexType &i, IndexType &j) const
 
void getJFaceGridIndex (IndexType faceID, IndexType &i, IndexType &j, IndexType &k) const
 
void getKFaceGridIndex (IndexType faceID, IndexType &i, IndexType &j, IndexType &k) const
 
Cells
virtual IndexType getCellCapacity () const
 Returns the capacity for number of cell in this mesh instance. More...
 
virtual CellType getCellType (IndexType cellID=0) const =0
 Return the type of the given cell. More...
 
virtual IndexType getNumberOfCellNodes (IndexType cellID=0) const =0
 Return the number of nodes associated with the given cell. More...
 
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 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...
 
Nodes
virtual IndexType getNodeCapacity () const
 Returns the capacity for number of nodes in this mesh instance. More...
 
Faces
virtual IndexType getFaceCapacity () const
 Returns the capacity for number of faces in this mesh instance. 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...
 
Edges
virtual IndexType getEdgeCapacity () const
 Returns the capacity for number of edges in this mesh instance. 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 Member Functions

 StructuredMesh (int meshType, IndexType Ni, IndexType Nj, IndexType Nk)
 Constructs a structured mesh instance from the given extent. More...
 
void structuredInit ()
 Initialize all the StructuredMesh members. More...
 

Protected Attributes

StackArray< IndexType, 3 > m_node_dims = {{0, 0, 0}}
 
StackArray< int64, 6 > m_node_extent = {{0, 0, 0, 0, 0, 0}}
 
IndexType m_node_jp = 0
 
IndexType m_node_kp = 0
 
StackArray< IndexType, 3 > m_cell_dims = {{0, 0, 0}}
 
IndexType m_cell_jp = 0
 
IndexType m_cell_kp = 0
 
StackArray< IndexType, 8 > m_cell_node_offsets = {{0, 0, 0, 0, 0, 0, 0, 0}}
 
StackArray< IndexType, 3 > m_total_faces = {{0, 0, 0}}
 
IndexType m_total_IJ_faces = 0
 
IndexType m_num_I_faces_in_k_slice = 0
 
IndexType m_num_J_faces_in_k_slice = 0
 
IndexType m_num_edges = 0
 
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

Base class that defines the core API common for structured mesh types.

The StructuredMesh class derives from the abstract Mesh base class and implements the core API for Structured meshes. Specifically, the StrucrturedMesh defines and implements all the extent-based operations.

See also
UniformMesh
RectilinearMesh
CurvilinearMesh
Mesh

Constructor & Destructor Documentation

◆ StructuredMesh() [1/2]

axom::mint::StructuredMesh::StructuredMesh ( )
delete

Default constructor. Disabled.

◆ ~StructuredMesh()

virtual axom::mint::StructuredMesh::~StructuredMesh ( )
inlinevirtual

Destructor.

◆ StructuredMesh() [2/2]

axom::mint::StructuredMesh::StructuredMesh ( int  meshType,
IndexType  Ni,
IndexType  Nj,
IndexType  Nk 
)
protected

Constructs a structured mesh instance from the given extent.

Parameters
[in]meshTypethe mesh type
[in]Nithe number of nodes along the I direction.
[in]Njthe number of nodes along the J direction.
[in]Nkthe number of nodes along the K direction.
Note
Nj and or Nk may be -1 to signify a 1D or 2D mesh.

Member Function Documentation

◆ getNumberOfCells()

virtual IndexType axom::mint::StructuredMesh::getNumberOfCells ( ) const
inlinefinaloverridevirtual

Return the number of cells in the mesh.

Implements axom::mint::Mesh.

References getCellResolution(), and axom::mint::Mesh::m_ndims.

◆ getCellType() [1/2]

virtual CellType axom::mint::StructuredMesh::getCellType ( IndexType   AXOM_UNUSED_PARAMcellID = 0) const
inlinefinaloverridevirtual

Return the type of cell this mesh holds. SEGMENT, QUAD, or HEX depending on the dimension.

Parameters
[in]cellIDthe ID of the cell in question, this parameter is ignored.

References axom::mint::HEX, axom::mint::Mesh::m_ndims, axom::mint::QUAD, and axom::mint::SEGMENT.

◆ getNumberOfCellNodes() [1/2]

virtual IndexType axom::mint::StructuredMesh::getNumberOfCellNodes ( IndexType   AXOM_UNUSED_PARAMcellID = 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.

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

◆ getCellNodeIDs() [1/4]

IndexType axom::mint::StructuredMesh::getCellNodeIDs ( IndexType  cellID,
IndexType nodes 
) const
inlinefinaloverridevirtual

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

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

References getCellGridIndex(), getNumberOfCells(), and SLIC_ASSERT.

◆ getNumberOfCellFaces()

virtual IndexType axom::mint::StructuredMesh::getNumberOfCellFaces ( IndexType   AXOM_UNUSED_PARAMcellID = 0) const
inlinefinaloverridevirtual

Return the number of faces associated with the given cell.

Parameters
[in]cellIDthe ID of the cell in question, this parameter is ignored.

Implements axom::mint::Mesh.

References axom::mint::getCellInfo(), getCellType(), and axom::mint::CellInfo::num_faces.

◆ getCellFaceIDs() [1/4]

IndexType axom::mint::StructuredMesh::getCellFaceIDs ( IndexType  cellID,
IndexType faces 
) const
inlinefinaloverridevirtual

Returns the IDs of the faces of the cell at (i,j) or (i, j, k).

Parameters
[in]ilogical index of the cell along the first dimension.
[in]jlogical index of the cell along the second dimension.
[in]klogical index of the cell along the third dimension (optional).
[out]facesbuffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces().
Note
The faces are returned in the order of LOWER_I_FACE, UPPER_I_FACE, LOWER_J_FACE, UPPER_J_FACE and then LOWER_K_FACE, UPPER_K_FACE if 3D.
Precondition
faces != nullptr
0 <= cellID < getNumberOfCells()

References cellJp(), cellKp(), getNumberOfCells(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getNumberOfNodes()

virtual IndexType axom::mint::StructuredMesh::getNumberOfNodes ( ) const
inlinefinaloverridevirtual

Return the number of nodes in the mesh.

Implements axom::mint::Mesh.

References getNodeResolution(), and axom::mint::Mesh::m_ndims.

◆ getNode()

virtual void axom::mint::StructuredMesh::getNode ( IndexType  nodeID,
double *  node 
) const
overridepure virtual

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.

Implemented in axom::mint::UniformMesh, axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.

◆ getCoordinateArray() [1/2]

virtual double* axom::mint::StructuredMesh::getCoordinateArray ( int  dim)
overridepure virtual

Returns pointer to the requested mesh coordinate buffer.

Parameters
[in]dimthe dimension of the requested coordinate buffer
Returns
ptr pointer to the coordinate buffer.
Note
if hasExplicitCoordinates() == true then the length of the returned buffer is getNumberOfNodes(). Otherwise the UniformMesh returns nullptr and the RectilinearMesh returns a pointer to the associated dimension scale which is of length static_cast< RectilinearMesh* >( this )->getNodeResolution( dim ).
Precondition
dim >= 0 && dim < dimension()
dim == X_COORDINATE || dim == Y_COORDINATE || dim == Z_COORDINATE

Implements axom::mint::Mesh.

Implemented in axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.

◆ getCoordinateArray() [2/2]

virtual const double* axom::mint::StructuredMesh::getCoordinateArray ( int  dim) const
overridepure virtual

◆ getNumberOfFaces()

virtual IndexType axom::mint::StructuredMesh::getNumberOfFaces ( ) const
inlinefinaloverridevirtual

Return the number of faces in the mesh.

Implements axom::mint::Mesh.

References getTotalNumFaces(), and m_total_IJ_faces.

◆ getFaceType()

virtual CellType axom::mint::StructuredMesh::getFaceType ( IndexType   AXOM_UNUSED_PARAMfaceID = 0) const
inlinefinaloverridevirtual

Return the type of face this mesh holds. SEGMENT or QUAD depending on the dimension.

Parameters
[in]faceIDthe ID of the face in question, this parameter is ignored.

Implements axom::mint::Mesh.

References axom::mint::Mesh::m_ndims, axom::mint::QUAD, axom::mint::SEGMENT, and axom::mint::UNDEFINED_CELL.

◆ getNumberOfFaceNodes()

virtual IndexType axom::mint::StructuredMesh::getNumberOfFaceNodes ( IndexType   AXOM_UNUSED_PARAMfaceID = 0) const
inlinefinaloverridevirtual

Return the number of nodes associated with the given face.

Parameters
[in]faceIDthe ID of the face in question, this parameter is ignored.

Implements axom::mint::Mesh.

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

◆ getFaceNodeIDs() [1/2]

IndexType axom::mint::StructuredMesh::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.
Precondition
nodes != nullptr
0 <= faceID < getNumberOfCells()

References getIFaceNodeIDs(), getJFaceNodeIDs(), getKFaceNodeIDs(), getNumberOfFaces(), getTotalNumFaces(), m_total_IJ_faces, and SLIC_ASSERT.

◆ getFaceCellIDs() [1/2]

void axom::mint::StructuredMesh::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.
Precondition
0 <= faceID < getNumberOfCells()

References getIFaceCellIDs(), getJFaceCellIDs(), getKFaceCellIDs(), getTotalNumFaces(), and m_total_IJ_faces.

◆ getNumberOfEdges()

virtual IndexType axom::mint::StructuredMesh::getNumberOfEdges ( ) const
inlinefinaloverridevirtual

Return the number of edges in the mesh.

Implements axom::mint::Mesh.

References m_num_edges.

◆ isExternal()

virtual bool axom::mint::StructuredMesh::isExternal ( ) const
inlineoverridevirtual

Returns true iff the mesh was constructed with external arrays.

Returns
status true if the mesh points to external buffers, else, false.

Implements axom::mint::Mesh.

Reimplemented in axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.

◆ getCellNodeOffsetsArray()

const StackArray<IndexType, 8>& axom::mint::StructuredMesh::getCellNodeOffsetsArray ( ) const
inline

Returns the cell node offsets array.

Returns
offsets pointer to the cell-to-node offsets array.
Postcondition
offsets != nullptr

References m_cell_node_offsets.

◆ getCellNodeIDs() [2/4]

IndexType axom::mint::StructuredMesh::getCellNodeIDs ( IndexType  i,
IndexType  j,
IndexType nodes 
) const
inline

Copy the node IDs of the given cell into the provided buffer.

Parameters
[in]ilogical index of the cell along the first dimension.
[in]jlogical index of the cell along the second dimension.
[in]klogical index of the cell along the third dimension (optional).
[out]nodespointer to buffer to populate with the node IDs.
Returns
the number of nodes in the cell.

References getCellNodeIDs().

◆ getCellNodeIDs() [3/4]

IndexType axom::mint::StructuredMesh::getCellNodeIDs ( IndexType  i,
IndexType  j,
IndexType  k,
IndexType nodes 
) const
inline

◆ getCellFaceIDs() [2/4]

void axom::mint::StructuredMesh::getCellFaceIDs ( IndexType  i,
IndexType  j,
IndexType faces 
) const
inline

Returns the IDs of the faces of the cell at (i,j) or (i, j, k).

Parameters
[in]ilogical index of the cell along the first dimension.
[in]jlogical index of the cell along the second dimension.
[in]klogical index of the cell along the third dimension (optional).
[out]facesbuffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces().
Note
The faces are returned in the order of LOWER_I_FACE, UPPER_I_FACE, LOWER_J_FACE, UPPER_J_FACE and then LOWER_K_FACE, UPPER_K_FACE if 3D.
Precondition
faces != nullptr

References getCellLinearIndex().

◆ getCellFaceIDs() [3/4]

void axom::mint::StructuredMesh::getCellFaceIDs ( IndexType  i,
IndexType  j,
IndexType  k,
IndexType faces 
) const
inline

References getCellLinearIndex().

◆ getIFaceNodeIDs()

IndexType axom::mint::StructuredMesh::getIFaceNodeIDs ( IndexType  faceID,
IndexType nodes 
) const
inline

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.
Note
Each method is specialized for faces in the I, J, or K direction.
Precondition
nodes != nullptr
0 <= faceID < getNumberOfCells()

References getNodeResolution(), getTotalNumFaces(), m_cell_node_offsets, axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getJFaceNodeIDs()

IndexType axom::mint::StructuredMesh::getJFaceNodeIDs ( IndexType  faceID,
IndexType nodes 
) const
inline

◆ getKFaceNodeIDs()

IndexType axom::mint::StructuredMesh::getKFaceNodeIDs ( IndexType  faceID,
IndexType nodes 
) const
inline

◆ getIFaceCellIDs()

void axom::mint::StructuredMesh::getIFaceCellIDs ( IndexType  faceID,
IndexType cellIDOne,
IndexType cellIDTwo 
) const
inline

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.
Each method is specialized for faces in the I, J, or K direction.
Precondition
0 <= faceID < getNumberOfCells()

References getCellLinearIndex(), getCellResolution(), getIFaceGridIndex(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getJFaceCellIDs()

void axom::mint::StructuredMesh::getJFaceCellIDs ( IndexType  faceID,
IndexType cellIDOne,
IndexType cellIDTwo 
) const
inline

◆ getKFaceCellIDs()

void axom::mint::StructuredMesh::getKFaceCellIDs ( IndexType  faceID,
IndexType cellIDOne,
IndexType cellIDTwo 
) const
inline

◆ getNodeResolution()

IndexType axom::mint::StructuredMesh::getNodeResolution ( IndexType  dim) const
inline

Returns the number of nodes along the given dimension.

Parameters
[in]dimthe dimension to query.
Precondition
0 <= dim < 3

References m_node_dims, and SLIC_ASSERT.

◆ getExtent()

void axom::mint::StructuredMesh::getExtent ( int64  extent[6]) const
inline

Get the global node extent of the mesh.

Parameters
[out]extentthe buffer to copy the global node extent into, must be of length at least 6.

References m_node_extent, and SLIC_ASSERT.

◆ setExtent()

void axom::mint::StructuredMesh::setExtent ( int  ndims,
const int64 *  extent 
)

Set the global node extent of the mesh.

Parameters
[in]ndimsthe number of dimensions to set.
[in]extentthe values to set, of length at least 2 * ndims.
Precondition
0 <= dim < 3

◆ getCellResolution()

IndexType axom::mint::StructuredMesh::getCellResolution ( IndexType  dim) const
inline

Returns the number of cells along the given dimension.

Parameters
[in]dimthe dimension to query.
Precondition
0 <= dim < 3

References m_cell_dims, and SLIC_ASSERT.

◆ getTotalNumFaces()

IndexType axom::mint::StructuredMesh::getTotalNumFaces ( int  direction) const
inline

Get the total number of I, J, or K faces.

References axom::mint::I_DIRECTION, axom::mint::K_DIRECTION, m_total_faces, and SLIC_ASSERT.

◆ nodeJp()

IndexType axom::mint::StructuredMesh::nodeJp ( ) const
inline

Returns stride to the second dimension of nodes.

Note
If the mesh is 1D the returned value is the largest number representable as an IndexType.

References m_node_jp.

◆ nodeKp()

IndexType axom::mint::StructuredMesh::nodeKp ( ) const
inline

kp stride to the third dimension of nodes.

Note
If the mesh is 1D or 2D the returned value is the largest number representable as an IndexType.

References m_node_kp.

◆ getNodeLinearIndex()

IndexType axom::mint::StructuredMesh::getNodeLinearIndex ( IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

Returns the linear index corresponding to the given logical node indices.

Parameters
[in]ilogical node index of the first dimension.
[in]jlogical node index of the second dimension.
[in]klogical node index of the third dimension (optional)
Postcondition
0 <= i < getNodeResolution( I_DIRECTION )
0 <= j < getNodeResolution( J_DIRECTION )
0 <= k < getNodeResolution( K_DIRECTION )

References nodeJp(), and nodeKp().

◆ getNodeGridIndex() [1/2]

void axom::mint::StructuredMesh::getNodeGridIndex ( IndexType  nodeID,
IndexType i,
IndexType j 
) const
inline

Given the 1D linear index of a node, this method computes the corresponding i-j-k grid index.

Parameters
[in]nodeIDthe local flat index.
[out]ithe corresponding grid index along the I_DIRECTION.
[out]jthe corresponding grid index along the J_DIRECTION.
[out]kthe corresponding grid index along the K_DIRECTION (optional).
Note
The first method is not valid for 3D meshes.
Precondition
nodeID >= 0 && nodeID < getNumNodes()
Postcondition
0 <= i < getNodeResolution( I_DIRECTION )
0 <= j < getNodeResolution( J_DIRECTION )
0 <= k < getNodeResolution( K_DIRECTION )

References axom::mint::Mesh::m_ndims, nodeJp(), and SLIC_ASSERT.

◆ getNodeGridIndex() [2/2]

void axom::mint::StructuredMesh::getNodeGridIndex ( IndexType  nodeID,
IndexType i,
IndexType j,
IndexType k 
) const
inline

References nodeJp(), and nodeKp().

◆ cellJp()

IndexType axom::mint::StructuredMesh::cellJp ( ) const
inline

Returns stride to the second dimension of cells.

Note
If the mesh is 1D the returned value is the largest number representable as an IndexType.
Postcondition
jp >= 0.

References m_cell_jp.

◆ cellKp()

IndexType axom::mint::StructuredMesh::cellKp ( ) const
inline

Returns stride to the third dimension of cells.

Note
If the mesh is 1D or 2D the returned value is the largest number representable as an IndexType.
Postcondition
kp >= 0.

References m_cell_kp.

◆ getCellLinearIndex()

IndexType axom::mint::StructuredMesh::getCellLinearIndex ( IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

Returns the linear index corresponding to the given logical grid cell indices.

Parameters
[in]ilogical cell index of the first dimension.
[in]jlogical cell index of the second dimension.
[in]klogical cell index of the third dimension (optional)
Precondition
0 <= i < getCellResolution( I_DIRECTION )
0 <= j < getCellResolution( J_DIRECTION )
0 <= k < getCellResolution( K_DIRECTION )

References cellJp(), and cellKp().

◆ getCellGridIndex() [1/2]

void axom::mint::StructuredMesh::getCellGridIndex ( IndexType  cellID,
IndexType i,
IndexType j 
) const
inline

Given the 1D linear index of a cell, this method computes the corresponding i-j-k grid index.

Parameters
[in]cellIDthe ID of the cell in question.
[out]ithe corresponding grid index along the I_DIRECTION.
[out]jthe corresponding grid index along the J_DIRECTION.
[out]kthe corresponding grid index along the K_DIRECTION.
Note
The first method is not valid for 3D meshes.
Precondition
cellID >= 0 && cellID < getNumNodes()
Postcondition
0 <= i < getCellResolution( I_DIRECTION )
0 <= j < getCellResolution( J_DIRECTION )
0 <= k < getCellResolution( K_DIRECTION )

References cellJp(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getCellGridIndex() [2/2]

void axom::mint::StructuredMesh::getCellGridIndex ( IndexType  cellID,
IndexType i,
IndexType j,
IndexType k 
) const
inline

References cellJp(), and cellKp().

◆ getFaceLinearIndex()

IndexType axom::mint::StructuredMesh::getFaceLinearIndex ( int  dir,
IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

Returns the linear index corresponding to the given logical grid face indices.

Parameters
[in]dirthe direction of the face in question.
[in]ilogical face index of the first dimension.
[in]jlogical face index of the second dimension.
[in]klogical face index of the third dimension (optional)

References getIFaceLinearIndex(), getJFaceLinearIndex(), getKFaceLinearIndex(), axom::mint::I_DIRECTION, axom::mint::J_DIRECTION, axom::mint::K_DIRECTION, axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getIFaceLinearIndex()

IndexType axom::mint::StructuredMesh::getIFaceLinearIndex ( IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

Returns the linear index corresponding to the given logical face indices.

Parameters
[in]ilogical face index of the first dimension.
[in]jlogical face index of the second dimension.
[in]klogical face index of the third dimension (optional)
Note
Each method is valid only for the appropriate dimension of the mesh.
Each method is specialized for a particular direction.

References getNodeResolution(), axom::mint::Mesh::m_ndims, m_num_I_faces_in_k_slice, and SLIC_ASSERT.

◆ getJFaceLinearIndex()

IndexType axom::mint::StructuredMesh::getJFaceLinearIndex ( IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

◆ getKFaceLinearIndex()

IndexType axom::mint::StructuredMesh::getKFaceLinearIndex ( IndexType  i,
IndexType  j,
IndexType  k = 0 
) const
inline

◆ getIFaceGridIndex() [1/2]

void axom::mint::StructuredMesh::getIFaceGridIndex ( IndexType  faceID,
IndexType i,
IndexType j 
) const
inline

Returns the grid indices corresponding to the given linear face index.

Parameters
[in]faceIDthe ID of the face in question.
[out]ilogical face index of the first dimension.
[out]jlogical face index of the second dimension.
[out]klogical face index of the third dimension (optional)
Note
Each method is valid only for the appropriate dimension of the mesh.
Each method is specialized for a particular direction.

References getNodeResolution(), getTotalNumFaces(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.

◆ getIFaceGridIndex() [2/2]

void axom::mint::StructuredMesh::getIFaceGridIndex ( IndexType  faceID,
IndexType i,
IndexType j,
IndexType k 
) const
inline

◆ getJFaceGridIndex() [1/2]

void axom::mint::StructuredMesh::getJFaceGridIndex ( IndexType  faceID,
IndexType i,
IndexType j 
) const
inline

◆ getJFaceGridIndex() [2/2]

void axom::mint::StructuredMesh::getJFaceGridIndex ( IndexType  faceID,
IndexType i,
IndexType j,
IndexType k 
) const
inline

◆ getKFaceGridIndex()

void axom::mint::StructuredMesh::getKFaceGridIndex ( IndexType  faceID,
IndexType i,
IndexType j,
IndexType k 
) const
inline

◆ structuredInit()

void axom::mint::StructuredMesh::structuredInit ( )
protected

Initialize all the StructuredMesh members.

◆ getCellCapacity()

virtual IndexType axom::mint::Mesh::getCellCapacity ( ) const
inlinevirtualinherited

Returns the capacity for number of cell in this mesh instance.

Returns
N the cell capacity
Postcondition
N >= 0

Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.

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

◆ getCellType() [2/2]

virtual CellType axom::mint::Mesh::getCellType ( IndexType  cellID = 0) const
pure virtualinherited

Return the type of the given cell.

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

Implemented in axom::mint::UnstructuredMesh< TOPO >.

◆ getNumberOfCellNodes() [2/2]

virtual IndexType axom::mint::Mesh::getNumberOfCellNodes ( IndexType  cellID = 0) const
pure virtualinherited

Return the number of nodes associated with the given cell.

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

Implemented in axom::mint::UnstructuredMesh< TOPO >.

◆ 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()

◆ 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.

◆ getNodeCapacity()

virtual IndexType axom::mint::Mesh::getNodeCapacity ( ) const
inlinevirtualinherited

Returns the capacity for number of nodes in this mesh instance.

Returns
N the node capacity
Postcondition
N >= 0

Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.

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

◆ getFaceCapacity()

virtual IndexType axom::mint::Mesh::getFaceCapacity ( ) const
inlinevirtualinherited

Returns the capacity for number of faces in this mesh instance.

Returns
N the face capacity
Postcondition
N >= 0

Reimplemented in axom::mint::UnstructuredMesh< TOPO >.

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

◆ getFaceNodeIDs() [2/2]

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.

◆ getEdgeCapacity()

virtual IndexType axom::mint::Mesh::getEdgeCapacity ( ) const
inlinevirtualinherited

Returns the capacity for number of edges in this mesh instance.

Returns
N the edge capacity
Postcondition
N >= 0

Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.

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

◆ 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_node_dims

StackArray<IndexType, 3> axom::mint::StructuredMesh::m_node_dims = {{0, 0, 0}}
protected

◆ m_node_extent

StackArray<int64, 6> axom::mint::StructuredMesh::m_node_extent = {{0, 0, 0, 0, 0, 0}}
protected

◆ m_node_jp

IndexType axom::mint::StructuredMesh::m_node_jp = 0
protected

◆ m_node_kp

IndexType axom::mint::StructuredMesh::m_node_kp = 0
protected

◆ m_cell_dims

StackArray<IndexType, 3> axom::mint::StructuredMesh::m_cell_dims = {{0, 0, 0}}
protected

◆ m_cell_jp

IndexType axom::mint::StructuredMesh::m_cell_jp = 0
protected

◆ m_cell_kp

IndexType axom::mint::StructuredMesh::m_cell_kp = 0
protected

◆ m_cell_node_offsets

StackArray<IndexType, 8> axom::mint::StructuredMesh::m_cell_node_offsets = {{0, 0, 0, 0, 0, 0, 0, 0}}
protected

◆ m_total_faces

StackArray<IndexType, 3> axom::mint::StructuredMesh::m_total_faces = {{0, 0, 0}}
protected

◆ m_total_IJ_faces

IndexType axom::mint::StructuredMesh::m_total_IJ_faces = 0
protected

◆ m_num_I_faces_in_k_slice

IndexType axom::mint::StructuredMesh::m_num_I_faces_in_k_slice = 0
protected

◆ m_num_J_faces_in_k_slice

IndexType axom::mint::StructuredMesh::m_num_J_faces_in_k_slice = 0
protected

◆ m_num_edges

IndexType axom::mint::StructuredMesh::m_num_edges = 0
protected

◆ 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: