A simple i-j-k (row-major order) to linear addressing for a rectilinear mesh. Since the underlying mesh is rectilinear, some mesh-related sizing information can be derived directly from the addressing information. More...
Public Member Functions | |
ijkMesh () | |
Construct zero-sized. More... | |
ijkMesh (const labelVector &ijk) | |
Construct with addressing. More... | |
ijkMesh (const label nx, const label ny, const label nz) | |
Construct with addressing. More... | |
label | nPoints () const |
The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh. More... | |
label | nCells () const |
The number of mesh cells (nx*ny*nz) in the i-j-k mesh. More... | |
label | nFaces () const |
The total number of mesh faces in the i-j-k mesh. More... | |
label | nInternalFaces () const |
The number of internal faces in the i-j-k mesh. More... | |
label | nBoundaryFaces () const |
The number of boundary faces in the i-j-k mesh. More... | |
label | nBoundaryFaces (const direction shapeFacei) const |
The number of boundary faces on the box face. More... | |
label | cellLabel (const label i, const label j, const label k) const |
The linear cell index for an i-j-k position - same as index() More... | |
label | cellLabel (const labelVector &ijk) const |
The linear cell index for an i-j-k position - same as index() More... | |
label | pointLabel (const label i, const label j, const label k) const |
The linear point index for an i-j-k position. More... | |
label | pointLabel (const labelVector &ijk) const |
The linear point index for an i-j-k position. More... | |
hexCell | vertLabels (const label i, const label j, const label k) const |
The hex cell vertices for an i-j-k position. More... | |
hexCell | vertLabels (const labelVector &ijk) const |
The hex cell vertices for an i-j-k position. More... | |
Public Member Functions inherited from ijkAddressing | |
ijkAddressing () | |
Construct zero-size addressing. More... | |
ijkAddressing (const labelVector &ijk) | |
Construct with addressing. More... | |
ijkAddressing (const label ni, const label nj, const label nk) | |
Construct with addressing components. More... | |
bool | empty () const |
Addressing is considered empty if any component is zero. More... | |
const labelVector & | sizes () const |
The (i,j,k) addressing dimensions. More... | |
labelVector & | sizes () |
Return the (i,j,k) dimensions for modification. More... | |
label | size () const |
Return the total i*j*k size. More... | |
const label & | size (const vector::components cmpt) const |
The addressing dimension in the given direction. More... | |
void | clear () |
Reset to (0,0,0) sizing. More... | |
void | reset (const label ni, const label nj, const label nk) |
Change the sizing parameters. More... | |
void | reset (const labelVector &newSizes) |
Change the sizing parameters. More... | |
label | index (const label i, const label j, const label k) const |
Linear addressing index (offset) for an (i,j,k) position. More... | |
label | index (const labelVector &ijk) const |
Linear addressing index (offset) for an (i,j,k) position. More... | |
labelVector | index (const label idx) const |
The (i,j,k) indexing from linear addressing. More... | |
void | checkIndex (const label i, const label j, const label k, const bool allowExtra=false) const |
Check indices are within ni,nj,nk range. More... | |
void | checkIndex (const labelVector &ijk, const bool allowExtra=false) const |
Check indices are within ni,nj,nk range. More... | |
void | checkSizes () const |
Check that all components of sizes() are non-negative. More... | |
void | checkSizes (const labelVector &other) const |
Check that all components of sizes() match. More... | |
void | checkSizes (const label nTotal) const |
Check that the total size matches. More... | |
A simple i-j-k (row-major order) to linear addressing for a rectilinear mesh. Since the underlying mesh is rectilinear, some mesh-related sizing information can be derived directly from the addressing information.
|
inline |
Construct zero-sized.
Definition at line 30 of file ijkMeshI.H.
|
inlineexplicit |
Construct with addressing.
Definition at line 36 of file ijkMeshI.H.
|
inline |
Construct with addressing.
Definition at line 42 of file ijkMeshI.H.
|
inline |
The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh.
Definition at line 55 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by Foam::operator<<().
|
inline |
The number of mesh cells (nx*ny*nz) in the i-j-k mesh.
This is the same as the ijkAddressing::size()
Definition at line 68 of file ijkMeshI.H.
References ijkAddressing::size().
Referenced by PDRblock::location::checkIndex(), and Foam::operator<<().
|
inline |
The total number of mesh faces in the i-j-k mesh.
Definition at line 74 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by Foam::operator<<().
|
inline |
The number of internal faces in the i-j-k mesh.
Definition at line 92 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by Foam::operator<<().
|
inline |
The number of boundary faces in the i-j-k mesh.
Definition at line 110 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
|
inline |
The number of boundary faces on the box face.
Face: 0=x-min, 1=x-max, 2=y-min, 3=y-max, 4=z-min, 5=z-max
Definition at line 128 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
|
inline |
The linear cell index for an i-j-k position - same as index()
Definition at line 165 of file ijkMeshI.H.
References Reaction< ReactionThermo >::specieCoeffs::index, and k.
|
inline |
The linear cell index for an i-j-k position - same as index()
Definition at line 176 of file ijkMeshI.H.
References Reaction< ReactionThermo >::specieCoeffs::index.
|
inline |
The linear point index for an i-j-k position.
Addressable in the range (ni+1, nj+1, nk+1).
Definition at line 182 of file ijkMeshI.H.
Referenced by Foam::facePoint(), Foam::facePointN(), and ijkMesh::vertLabels().
|
inline |
The linear point index for an i-j-k position.
Addressable in the range (ni+1, nj+1, nk+1).
Definition at line 199 of file ijkMeshI.H.
References n, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Foam::hexCell vertLabels | ( | const label | i, |
const label | j, | ||
const label | k | ||
) | const |
The hex cell vertices for an i-j-k position.
Definition at line 33 of file ijkMesh.C.
References k, and ijkMesh::pointLabel().
Foam::hexCell vertLabels | ( | const labelVector & | ijk | ) | const |
The hex cell vertices for an i-j-k position.
Definition at line 50 of file ijkMesh.C.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().