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...
#include <ijkMesh.H>


Public Member Functions | |
| ijkMesh () | |
| Construct zero-sized. | |
| ijkMesh (const labelVector &ijk) | |
| Construct with addressing. | |
| ijkMesh (const label nx, const label ny, const label nz) | |
| Construct with addressing. | |
| label | nPoints () const |
| The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh. | |
| label | nCells () const |
| The number of mesh cells (nx*ny*nz) in the i-j-k mesh. | |
| label | nFaces () const |
| The total number of mesh faces in the i-j-k mesh. | |
| label | nInternalFaces () const |
| The number of internal faces in the i-j-k mesh. | |
| label | nBoundaryFaces () const |
| The number of boundary faces in the i-j-k mesh. | |
| label | nBoundaryFaces (const direction shapeFacei) const |
| The number of boundary faces on the box face. | |
| 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(). | |
| label | cellLabel (const labelVector &ijk) const |
| The linear cell index for an i-j-k position - same as index(). | |
| label | pointLabel (const label i, const label j, const label k) const |
| The linear point index for an i-j-k position. | |
| label | pointLabel (const labelVector &ijk) const |
| The linear point index for an i-j-k position. | |
| hexCell | vertLabels (const label i, const label j, const label k) const |
| The hex cell vertices for an i-j-k position. | |
| hexCell | vertLabels (const labelVector &ijk) const |
| The hex cell vertices for an i-j-k position. | |
| Public Member Functions inherited from ijkAddressing | |
| ijkAddressing () | |
| Construct zero-size addressing. | |
| ijkAddressing (const labelVector &ijk) | |
| Construct with addressing. | |
| ijkAddressing (const label ni, const label nj, const label nk) | |
| Construct with addressing components. | |
| bool | empty () const noexcept |
| Addressing is considered empty if any component is zero. | |
| const labelVector & | sizes () const noexcept |
| The (i,j,k) addressing dimensions. | |
| labelVector & | sizes () noexcept |
| Return the (i,j,k) dimensions for modification. | |
| label | size () const noexcept |
| Return the total i*j*k size. | |
| label | size (const vector::components cmpt) const |
| The addressing dimension in the given direction. | |
| void | clear () |
| Reset to (0,0,0) sizing. | |
| void | reset (const label ni, const label nj, const label nk) |
| Change the sizing parameters. | |
| void | reset (const labelVector &newSizes) |
| Change the sizing parameters. | |
| label | index (const label i, const label j, const label k) const |
| Linear addressing index (offset) for an (i,j,k) position. | |
| label | index (const labelVector &ijk) const |
| Linear addressing index (offset) for an (i,j,k) position. | |
| labelVector | index (const label idx) const |
| The (i,j,k) indexing from linear addressing. | |
| void | checkIndex (const label i, const label j, const label k, const bool allowExtra=false) const |
| Check indices are within ni,nj,nk range. | |
| void | checkIndex (const labelVector &ijk, const bool allowExtra=false) const |
| Check indices are within ni,nj,nk range. | |
| void | checkSizes () const |
| Check that all components of sizes() are non-negative. | |
| void | checkSizes (const labelVector &other) const |
| Check that all components of sizes() match. | |
| void | checkSizes (const label nTotal) const |
| Check that the total size matches. | |
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 23 of file ijkMeshI.H.
References ijkAddressing::ijkAddressing().
Referenced by blockDescriptor::blockDescriptor(), blockDescriptor::blockDescriptor(), and PDRblock::PDRblock().


|
inlineexplicit |
Construct with addressing.
Definition at line 29 of file ijkMeshI.H.
References ijkAddressing::ijkAddressing().

|
inline |
Construct with addressing.
Definition at line 35 of file ijkMeshI.H.
References ijkAddressing::ijkAddressing().

|
inline |
The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh.
Definition at line 48 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().

|
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 61 of file ijkMeshI.H.
References ijkAddressing::size().
Referenced by PDRblock::location::checkIndex(), PDRblock::PDRblock(), PDRblock::reset(), and block::shapes().


|
inline |
The total number of mesh faces in the i-j-k mesh.
Definition at line 67 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by PDRblock::innerMesh().


|
inline |
The number of internal faces in the i-j-k mesh.
Definition at line 85 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by PDRblock::innerMesh().


|
inline |
The number of boundary faces in the i-j-k mesh.
Definition at line 103 of file ijkMeshI.H.
References ijkAddressing::empty(), n, and ijkAddressing::sizes().
Referenced by PDRblock::reset(), and PDRblock::reset().


|
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 121 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 158 of file ijkMeshI.H.
References ijkAddressing::index(), and k.

|
inline |
The linear cell index for an i-j-k position - same as index().
Definition at line 169 of file ijkMeshI.H.
References ijkAddressing::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 175 of file ijkMeshI.H.
References ijkAddressing::checkIndex(), k, n, and ijkAddressing::sizes().
Referenced by Foam::facePoint(), Foam::facePointN(), blockDescriptor::facePoints(), and 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 192 of file ijkMeshI.H.
References ijkAddressing::checkIndex(), n, ijkAddressing::sizes(), 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 26 of file ijkMesh.C.
References k, and pointLabel().
Referenced by block::shapes(), and vertLabels().


| Foam::hexCell vertLabels | ( | const labelVector & | ijk | ) | const |
The hex cell vertices for an i-j-k position.
Definition at line 43 of file ijkMesh.C.
References vertLabels(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
