![]() |
NDEVR
API Documentation
|
Converts 1 dimensional index into N dimensional index based on size of each dimension. More...
Public Member Functions | |
| Vector< t_dims, uint04 > | convertFromIndex (const uint04 &location) const |
| Converts a flat 1D index back into an N-dimensional grid coordinate. | |
| uint04 | convertToIndex (const Vector< t_dims, uint04 > &location) const |
| Converts an N-dimensional grid coordinate into a flat 1D index using row-major ordering. | |
| void | setSize (Vector< t_dims, uint04 > index_size) |
| Sets the size of the grid in each dimension. | |
Static Public Member Functions | |
| static constexpr uint01 | getNumberOfCorners () |
| Returns the number of corners for a grid cell of the given dimensionality. | |
Protected Attributes | |
| Vector< t_dims, uint04 > | m_size |
| The number of elements along each dimension of the grid. | |
Converts 1 dimensional index into N dimensional index based on size of each dimension.
Definition at line 41 of file GriddedMesh.h.
|
inline |
Converts a flat 1D index back into an N-dimensional grid coordinate.
| [in] | location | The flat 1D index to convert. |
Definition at line 66 of file GriddedMesh.h.
References m_size.
Referenced by GridMesh< t_dims >::setupVertexTable().
|
inline |
Converts an N-dimensional grid coordinate into a flat 1D index using row-major ordering.
| [in] | location | The N-dimensional grid coordinate to convert. |
Definition at line 49 of file GriddedMesh.h.
References m_size.
Referenced by GridMesh< t_dims >::getVertexProperty(), GridMesh< t_dims >::setVertex(), GridMesh< t_dims >::setVertexProperty(), and GridMesh< t_dims >::vertex().
|
inlinestaticconstexpr |
Returns the number of corners for a grid cell of the given dimensionality.
For 1D returns 2 (line segment endpoints), for 2D returns 4 (quad corners), for 3D returns 8 (cube/hexahedron corners).
Definition at line 95 of file GriddedMesh.h.
|
inline |
Sets the size of the grid in each dimension.
| [in] | index_size | The number of elements along each dimension. |
Definition at line 110 of file GriddedMesh.h.
References m_size.
Referenced by GridMesh< t_dims >::setupVertexTable().