AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Provides the ability to represent and operate on a UniformMesh. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/mint/mesh/UniformMesh.hpp>
Public Member Functions | |
UniformMesh ()=delete | |
Default constructor. Disabled. More... | |
double | evaluateCoordinate (IndexType i, int direction) const |
Evaluates the physical coordinate of a node along a given diction. More... | |
virtual bool | isExternal () const override |
Returns true iff the mesh was constructed with external arrays. More... | |
Native Constructors | |
UniformMesh (const double *lower_bound, const double *upper_bound, IndexType Ni, IndexType Nj=-1, IndexType Nk=-1) | |
Constructs a uniform mesh within a specified rectangular region, defined by its lower and upper corner points, and mesh dimensions, Ni, Nj, Nk. More... | |
Virtual methods | |
virtual | ~UniformMesh () |
Destructor. More... | |
Nodes | |
virtual void | getNode (IndexType nodeID, double *node) const final override |
Copy the coordinates of the given node into the provided buffer. More... | |
virtual double * | getCoordinateArray (int AXOM_UNUSED_PARAM(dim)) final override |
Return a pointer to the nodal positions in the specified dimension. Since the UniformMesh holds no such array it return nullptr. More... | |
virtual const double * | getCoordinateArray (int AXOM_UNUSED_PARAM(dim)) const final override |
Attribute Querying Methods | |
const StackArray< double, 3 > & | getOrigin () const |
Returns a const pointer to origin of the Uniform Mesh. More... | |
const StackArray< double, 3 > & | getSpacing () const |
Returns a const pointer to spacing of the Uniform Mesh. 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... | |
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 |
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 | 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 |
Cells | |
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... | |
virtual IndexType | getCellCapacity () const |
Returns the capacity for number of cell in this mesh instance. 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 |
Nodes | |
virtual IndexType | getNumberOfNodes () const final override |
Return the number of nodes in the mesh. 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 |
Faces | |
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... | |
virtual IndexType | getFaceCapacity () const |
Returns the capacity for number of faces in this mesh instance. More... | |
Edges | |
virtual IndexType | getNumberOfEdges () const final override |
Return the number of edges in the mesh. More... | |
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 |
Nodes | |
virtual IndexType | getNodeCapacity () const |
Returns the capacity for number of nodes in this mesh instance. 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 FieldData * | getFieldData (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 | |
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 |
FieldData * | m_mesh_fields [NUM_FIELD_ASSOCIATIONS] |
Provides the ability to represent and operate on a UniformMesh.
The UniformMesh extends from the StructuredMesh base class and provides the ability to represent and operate on a uniform mesh and associated data.
A uniform mesh , also called a regular mesh, subdivides the domain in cells that have uniform spacing across each coordinate axis.The nodes and cells of a uniform mesh are arranged on a regular grid lattice, where the topology is implicitly defined according to the ordering of the nodes in the logical i-j-k index space. Moreover, the geometry is also implicitly defined on a uniform mesh . Given an origin point, \( \hat{x_0} \) and spacing, \( \hat{h} \), along each axis, the coordinates of a node can be evaluated algebraically by the following:
\( \hat{p} = \hat{x_0} + \hat{i} \times \hat{h} \),
where \(\hat{i}\) is the logical i-j-k index of the corresponding node.
A UniformMesh object may be constructed using (a) a native constructor, or (b) from a a Sidre group when Mint is compiled with Sidre support.
Native Constructor
When using native constructor, the UniformMesh object owns all memory that is associated with the mesh. Once the UniformMesh object goes out-of-scope all memory associated with it is returned to the system.
Sidre Constructor
When a UniformMesh is associated with a Sidre Group, Sidre owns all the memory. Once the UniformMesh goes out-of-scope the data remains persistent in Sidre.
|
delete |
Default constructor. Disabled.
axom::mint::UniformMesh::UniformMesh | ( | const double * | lower_bound, |
const double * | upper_bound, | ||
IndexType | Ni, | ||
IndexType | Nj = -1 , |
||
IndexType | Nk = -1 |
||
) |
Constructs a uniform mesh within a specified rectangular region, defined by its lower and upper corner points, and mesh dimensions, Ni, Nj, Nk.
[in] | lower_bound | lower corner coordinates of rectangular region. |
[in] | upper_bound | upper corner coordinates of rectangular region. |
[in] | Ni | the number of nodes in the i-direction |
[in] | Nj | the number of nodes in the j-direction (if dimension >= 2) |
[in] | Nk | the number of nodes in the k-direction (if dimension == 3) |
|
inlinevirtual |
Destructor.
|
finaloverridevirtual |
Copy the coordinates of the given node into the provided buffer.
[in] | nodeID | the ID of the node in question. |
[in] | coords | the buffer to copy the coordinates into, of length at least getDimension(). |
Implements axom::mint::StructuredMesh.
|
inlinefinaloverridevirtual |
Return a pointer to the nodal positions in the specified dimension. Since the UniformMesh holds no such array it return nullptr.
References SLIC_ERROR.
|
inlinefinaloverridevirtual |
References SLIC_ERROR.
|
inline |
Returns a const pointer to origin of the Uniform Mesh.
|
inline |
Returns a const pointer to spacing of the Uniform Mesh.
|
inline |
Evaluates the physical coordinate of a node along a given diction.
[in] | i | the node's logical grid index along the specified direction |
[in] | direction | the direction in query, e.g, I_DIRECTION, etc. |
References axom::mint::Mesh::getDimension(), axom::mint::StructuredMesh::getNodeResolution(), getOrigin(), getSpacing(), and SLIC_ASSERT.
|
inlinefinaloverridevirtualinherited |
Return the number of cells in the mesh.
Implements axom::mint::Mesh.
References axom::mint::StructuredMesh::getCellResolution(), and axom::mint::Mesh::m_ndims.
|
inlinefinaloverridevirtualinherited |
Return the type of cell this mesh holds. SEGMENT, QUAD, or HEX depending on the dimension.
[in] | cellID | the 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.
Return the type of the given cell.
[in] | cellID | the ID of the cell in question, this parameter is ignored if hasMixedCellTypes() == false. |
Implemented in axom::mint::UnstructuredMesh< TOPO >.
|
inlinefinaloverridevirtualinherited |
Return the number of nodes associated with the given cell.
[in] | cellID | the ID of the cell in question, this parameter is ignored. |
References axom::mint::Mesh::m_ndims.
|
pure virtualinherited |
Return the number of nodes associated with the given cell.
[in] | cellID | the ID of the cell in question, this parameter is ignored unless hasMixedCellTypes() == true. |
Implemented in axom::mint::UnstructuredMesh< TOPO >.
|
inlinefinaloverridevirtualinherited |
Copy the node IDs of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes().
[in] | cellID | the ID of the cell in question. |
[out] | nodes | the buffer into which the node IDs are copied, must be of length at least getNumberOfCellNodes(). |
References axom::mint::StructuredMesh::getCellGridIndex(), axom::mint::StructuredMesh::getNumberOfCells(), and SLIC_ASSERT.
|
inlineinherited |
Copy the node IDs of the given cell into the provided buffer.
[in] | i | logical index of the cell along the first dimension. |
[in] | j | logical index of the cell along the second dimension. |
[in] | k | logical index of the cell along the third dimension (optional). |
[out] | nodes | pointer to buffer to populate with the node IDs. |
References axom::mint::StructuredMesh::getCellNodeIDs().
|
pure virtualinherited |
Copy the connectivity of the given cell into the provided buffer. The buffer must be of length at least getNumberOfCellNodes( cellID ).
[in] | cellID | the ID of the cell in question. |
[out] | nodes | the buffer into which the connectivity is copied, must be of length at least getNumberOfCellNodes( cellID ). |
|
inlinefinaloverridevirtualinherited |
Return the number of faces associated with the given cell.
[in] | cellID | the ID of the cell in question, this parameter is ignored. |
Implements axom::mint::Mesh.
References axom::mint::getCellInfo(), axom::mint::StructuredMesh::getCellType(), and axom::mint::CellInfo::num_faces.
|
inlinefinaloverridevirtualinherited |
Returns the IDs of the faces of the cell at (i,j) or (i, j, k).
[in] | i | logical index of the cell along the first dimension. |
[in] | j | logical index of the cell along the second dimension. |
[in] | k | logical index of the cell along the third dimension (optional). |
[out] | faces | buffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces(). |
References axom::mint::StructuredMesh::cellJp(), axom::mint::StructuredMesh::cellKp(), axom::mint::StructuredMesh::getNumberOfCells(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
|
inlineinherited |
Returns the IDs of the faces of the cell at (i,j) or (i, j, k).
[in] | i | logical index of the cell along the first dimension. |
[in] | j | logical index of the cell along the second dimension. |
[in] | k | logical index of the cell along the third dimension (optional). |
[out] | faces | buffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces(). |
References axom::mint::StructuredMesh::getCellLinearIndex().
|
inlineinherited |
References axom::mint::StructuredMesh::getCellLinearIndex().
|
pure virtualinherited |
Populates the given buffer with the IDs of the faces of the given cell and returns the number of faces.
[in] | cellID | the ID of the cellID in question. |
[out] | faces | buffer to populate with the face IDs. Must be of length at least getNumberOfCellFaces( cellID ). |
Implemented in axom::mint::ParticleMesh.
|
inlinefinaloverridevirtualinherited |
Return the number of nodes in the mesh.
Implements axom::mint::Mesh.
References axom::mint::StructuredMesh::getNodeResolution(), and axom::mint::Mesh::m_ndims.
|
overridepure virtualinherited |
Returns pointer to the requested mesh coordinate buffer.
[in] | dim | the dimension of the requested coordinate buffer |
Implements axom::mint::Mesh.
Implemented in axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.
|
overridepure virtualinherited |
Implements axom::mint::Mesh.
Implemented in axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.
|
inlinefinaloverridevirtualinherited |
Return the number of faces in the mesh.
Implements axom::mint::Mesh.
References axom::mint::StructuredMesh::getTotalNumFaces(), and axom::mint::StructuredMesh::m_total_IJ_faces.
|
inlinefinaloverridevirtualinherited |
Return the type of face this mesh holds. SEGMENT or QUAD depending on the dimension.
[in] | faceID | the 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.
|
inlinefinaloverridevirtualinherited |
Return the number of nodes associated with the given face.
[in] | faceID | the ID of the face in question, this parameter is ignored. |
Implements axom::mint::Mesh.
References axom::mint::Mesh::m_ndims.
|
inlinefinaloverridevirtualinherited |
Copy the IDs of the nodes that compose the given face into the provided buffer.
[in] | faceID | the ID of the face in question. |
[out] | nodes | the buffer into which the node IDs are copied, must be of length at least getNumberOfFaceNodes(). |
References axom::mint::StructuredMesh::getIFaceNodeIDs(), axom::mint::StructuredMesh::getJFaceNodeIDs(), axom::mint::StructuredMesh::getKFaceNodeIDs(), axom::mint::StructuredMesh::getNumberOfFaces(), axom::mint::StructuredMesh::getTotalNumFaces(), axom::mint::StructuredMesh::m_total_IJ_faces, and SLIC_ASSERT.
|
pure virtualinherited |
Copy the IDs of the nodes that compose the given face into the provided buffer.
[in] | faceID | the ID of the face in question. |
[out] | nodes | the buffer into which the node IDs are copied, must be of length at least getNumberOfFaceNodes(). |
Implemented in axom::mint::ParticleMesh.
|
inlinefinaloverridevirtualinherited |
Copy the IDs of the cells adjacent to the given face into the provided indices.
[in] | faceID | the ID of the face in question. |
[out] | cellIDOne | the ID of the first cell. |
[out] | cellIDTwo | the ID of the second cell. |
References axom::mint::StructuredMesh::getIFaceCellIDs(), axom::mint::StructuredMesh::getJFaceCellIDs(), axom::mint::StructuredMesh::getKFaceCellIDs(), axom::mint::StructuredMesh::getTotalNumFaces(), and axom::mint::StructuredMesh::m_total_IJ_faces.
|
pure virtualinherited |
Copy the IDs of the cells adjacent to the given face into the provided indices.
[in] | faceID | the ID of the face in question. |
[out] | cellIDOne | the ID of the first cell. |
[out] | cellIDTwo | the ID of the second cell. |
Implemented in axom::mint::ParticleMesh.
|
inlinefinaloverridevirtualinherited |
Return the number of edges in the mesh.
Implements axom::mint::Mesh.
References axom::mint::StructuredMesh::m_num_edges.
|
inlineoverridevirtualinherited |
Returns true iff the mesh was constructed with external arrays.
Implements axom::mint::Mesh.
Reimplemented in axom::mint::RectilinearMesh, and axom::mint::CurvilinearMesh.
|
inlineinherited |
Returns the cell node offsets array.
References axom::mint::StructuredMesh::m_cell_node_offsets.
|
inlineinherited |
Copy the IDs of the nodes that compose the given face into the provided buffer.
[in] | faceID | the ID of the face in question. |
[out] | nodes | the buffer into which the node IDs are copied, must be of length at least getNumberOfFaceNodes(). |
References axom::mint::StructuredMesh::getNodeResolution(), axom::mint::StructuredMesh::getTotalNumFaces(), axom::mint::StructuredMesh::m_cell_node_offsets, axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
|
inlineinherited |
Copy the IDs of the cells adjacent to the given face into the provided indices.
[in] | faceID | the ID of the face in question. |
[out] | cellIDOne | the ID of the first cell. |
[out] | cellIDTwo | the ID of the second cell. |
References axom::mint::StructuredMesh::getCellLinearIndex(), axom::mint::StructuredMesh::getCellResolution(), axom::mint::StructuredMesh::getIFaceGridIndex(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
Returns the number of nodes along the given dimension.
[in] | dim | the dimension to query. |
References axom::mint::StructuredMesh::m_node_dims, and SLIC_ASSERT.
|
inlineinherited |
Get the global node extent of the mesh.
[out] | extent | the buffer to copy the global node extent into, must be of length at least 6. |
References axom::mint::StructuredMesh::m_node_extent, and SLIC_ASSERT.
|
inherited |
Set the global node extent of the mesh.
[in] | ndims | the number of dimensions to set. |
[in] | extent | the values to set, of length at least 2 * ndims. |
Returns the number of cells along the given dimension.
[in] | dim | the dimension to query. |
References axom::mint::StructuredMesh::m_cell_dims, and SLIC_ASSERT.
|
inlineinherited |
Get the total number of I, J, or K faces.
References axom::mint::I_DIRECTION, axom::mint::K_DIRECTION, axom::mint::StructuredMesh::m_total_faces, and SLIC_ASSERT.
|
inlineinherited |
Returns stride to the second dimension of nodes.
References axom::mint::StructuredMesh::m_node_jp.
|
inlineinherited |
kp stride to the third dimension of nodes.
References axom::mint::StructuredMesh::m_node_kp.
|
inlineinherited |
Returns the linear index corresponding to the given logical node indices.
[in] | i | logical node index of the first dimension. |
[in] | j | logical node index of the second dimension. |
[in] | k | logical node index of the third dimension (optional) |
References axom::mint::StructuredMesh::nodeJp(), and axom::mint::StructuredMesh::nodeKp().
|
inlineinherited |
Given the 1D linear index of a node, this method computes the corresponding i-j-k grid index.
[in] | nodeID | the local flat index. |
[out] | i | the corresponding grid index along the I_DIRECTION. |
[out] | j | the corresponding grid index along the J_DIRECTION. |
[out] | k | the corresponding grid index along the K_DIRECTION (optional). |
References axom::mint::Mesh::m_ndims, axom::mint::StructuredMesh::nodeJp(), and SLIC_ASSERT.
|
inlineinherited |
References axom::mint::StructuredMesh::nodeJp(), and axom::mint::StructuredMesh::nodeKp().
|
inlineinherited |
Returns stride to the second dimension of cells.
References axom::mint::StructuredMesh::m_cell_jp.
|
inlineinherited |
Returns stride to the third dimension of cells.
References axom::mint::StructuredMesh::m_cell_kp.
|
inlineinherited |
Returns the linear index corresponding to the given logical grid cell indices.
[in] | i | logical cell index of the first dimension. |
[in] | j | logical cell index of the second dimension. |
[in] | k | logical cell index of the third dimension (optional) |
References axom::mint::StructuredMesh::cellJp(), and axom::mint::StructuredMesh::cellKp().
|
inlineinherited |
Given the 1D linear index of a cell, this method computes the corresponding i-j-k grid index.
[in] | cellID | the ID of the cell in question. |
[out] | i | the corresponding grid index along the I_DIRECTION. |
[out] | j | the corresponding grid index along the J_DIRECTION. |
[out] | k | the corresponding grid index along the K_DIRECTION. |
References axom::mint::StructuredMesh::cellJp(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
|
inlineinherited |
References axom::mint::StructuredMesh::cellJp(), and axom::mint::StructuredMesh::cellKp().
|
inlineinherited |
Returns the linear index corresponding to the given logical grid face indices.
[in] | dir | the direction of the face in question. |
[in] | i | logical face index of the first dimension. |
[in] | j | logical face index of the second dimension. |
[in] | k | logical face index of the third dimension (optional) |
References axom::mint::StructuredMesh::getIFaceLinearIndex(), axom::mint::StructuredMesh::getJFaceLinearIndex(), axom::mint::StructuredMesh::getKFaceLinearIndex(), axom::mint::I_DIRECTION, axom::mint::J_DIRECTION, axom::mint::K_DIRECTION, axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
|
inlineinherited |
Returns the linear index corresponding to the given logical face indices.
[in] | i | logical face index of the first dimension. |
[in] | j | logical face index of the second dimension. |
[in] | k | logical face index of the third dimension (optional) |
References axom::mint::StructuredMesh::getNodeResolution(), axom::mint::Mesh::m_ndims, axom::mint::StructuredMesh::m_num_I_faces_in_k_slice, and SLIC_ASSERT.
|
inlineinherited |
Returns the grid indices corresponding to the given linear face index.
[in] | faceID | the ID of the face in question. |
[out] | i | logical face index of the first dimension. |
[out] | j | logical face index of the second dimension. |
[out] | k | logical face index of the third dimension (optional) |
References axom::mint::StructuredMesh::getNodeResolution(), axom::mint::StructuredMesh::getTotalNumFaces(), axom::mint::Mesh::m_ndims, and SLIC_ASSERT.
|
protectedinherited |
Initialize all the StructuredMesh members.
|
inlinevirtualinherited |
Returns the capacity for number of cell in this mesh instance.
Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.
References axom::mint::Mesh::getNumberOfCells().
|
inlinevirtualinherited |
Returns the capacity for number of nodes in this mesh instance.
Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.
References axom::mint::Mesh::getNumberOfNodes().
|
inlinevirtualinherited |
Returns the capacity for number of faces in this mesh instance.
Reimplemented in axom::mint::UnstructuredMesh< TOPO >.
References axom::mint::Mesh::getNumberOfFaces().
|
inlinevirtualinherited |
Returns the capacity for number of edges in this mesh instance.
Reimplemented in axom::mint::UnstructuredMesh< TOPO >, and axom::mint::ParticleMesh.
References axom::mint::Mesh::getNumberOfEdges().
|
inlineinherited |
Returns the dimension for this mesh instance.
References axom::mint::Mesh::m_ndims.
|
inlineinherited |
Returns the ID of this mesh instance.
References axom::mint::Mesh::m_block_idx.
|
inherited |
set the block ID of this mesh instance.
[in] | ID | the new block ID. |
|
inlineinherited |
Returns the partition ID of this mesh instance.
References axom::mint::Mesh::m_part_idx.
|
inherited |
set the partition ID of this mesh instance.
[in] | ID | the new partition ID. |
|
inlineinherited |
Returns the mesh type of this mesh instance.
References axom::mint::Mesh::m_type.
|
inlineinherited |
Checks if this mesh instance has explicit coordinates.
References axom::mint::Mesh::m_explicit_coords.
|
inlineinherited |
Checks if this mesh instance has explicit connectivity.
References axom::mint::Mesh::m_explicit_connectivity.
|
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.
References axom::mint::Mesh::m_has_mixed_topology.
|
inlineinherited |
Returns true if the mesh type is structured.
References axom::mint::Mesh::m_type, axom::mint::STRUCTURED_CURVILINEAR_MESH, axom::mint::STRUCTURED_RECTILINEAR_MESH, and axom::mint::STRUCTURED_UNIFORM_MESH.
|
inlineinherited |
Returns true if the mesh type is unstructured.
References axom::mint::Mesh::m_type, and axom::mint::UNSTRUCTURED_MESH.
|
inlineinherited |
|
inlineinherited |
Returns const pointer to the FieldData instance with the specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc.
[in] | association | the specified mesh field association |
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.
|
inlineinherited |
Check if a field with the given name and association exists.
[in] | name | the name of the field in query. |
[in] | association | the field association (optional) |
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.
|
inlineinherited |
Creates a new field with the given name and specified mesh field association, e.g., NODE_CENTERED, CELL_CENTERED, etc.
[in] | name | the name of the new field. |
[in] | association | the mesh field association. |
[in] | num_components | number of components of the field (optional). |
[in] | storeInSidre | indicates whether to store the field in the corresponding Sidre group (optional). |
[in] | capacity |
References axom::mint::FieldData::createField(), axom::mint::Mesh::getFieldData(), axom::mint::Mesh::hasField(), SLIC_ASSERT, and SLIC_ERROR_IF.
|
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.
[in] | name | the name of the new field. |
[in] | association | the mesh field association. |
[in] | data | pointer to the external data buffer. |
[in] | num_components | number of components of the field (optional). |
References axom::mint::FieldData::createField(), axom::mint::Mesh::getFieldData(), axom::mint::Mesh::hasField(), SLIC_ASSERT, and SLIC_ERROR_IF.
|
inlineinherited |
Removes the field with the given name and specified association.
[in] | name | the name of the field to remove. |
[in] | association | the mesh field association. |
References axom::mint::Mesh::getFieldData(), axom::mint::FieldData::hasField(), axom::mint::Mesh::hasField(), axom::mint::FieldData::removeField(), and SLIC_WARNING_IF.
|
inlineinherited |
Returns pointer to buffer of the field with the given ane and specified mesh field association.
[in] | name | the name of the requested field. |
[in] | association | the mesh field association. |
[out] | num_components | the number of components per tuple (optional). |
References axom::mint::Mesh::getFieldPtr().
|
inlineinherited |
|
inlineinherited |
References axom::mint::Mesh::getFieldData(), axom::mint::FieldData::getFieldPtr(), and SLIC_ASSERT.
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
mesh dimension
|
protectedinherited |
the type of the mesh
|
protectedinherited |
the Block ID of the mesh
|
protectedinherited |
the partition ID of the mesh
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |