A simple i-j-k (row-major order) to linear addressing. More...
#include <ijkAddressing.H>

Public Member Functions | |
| 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.
Definition at line 47 of file ijkAddressing.H.
|
inline |
Construct zero-size addressing.
Definition at line 23 of file ijkAddressingI.H.
Referenced by ijkMesh::ijkMesh(), ijkMesh::ijkMesh(), and ijkMesh::ijkMesh().

|
inlineexplicit |
Construct with addressing.
Definition at line 29 of file ijkAddressingI.H.
References checkSizes().

|
inline |
Construct with addressing components.
Definition at line 39 of file ijkAddressingI.H.
References checkSizes().

|
inlinenoexcept |
Addressing is considered empty if any component is zero.
Definition at line 56 of file ijkAddressingI.H.
References Foam::noexcept.
Referenced by ijkMesh::nBoundaryFaces(), ijkMesh::nBoundaryFaces(), ijkMesh::nFaces(), ijkMesh::nInternalFaces(), and ijkMesh::nPoints().

|
inlinenoexcept |
The (i,j,k) addressing dimensions.
Definition at line 89 of file ijkAddressing.H.
References Foam::noexcept.
Referenced by blockDescriptor::blockDescriptor(), PDRblock::blockMeshDict(), blockDescriptor::density(), blockDescriptor::edge(), blockDescriptor::edgePointsWeights(), blockDescriptor::edgesPointsWeights(), blockDescriptor::facePointLabel(), blockDescriptor::facePoints(), blockDescriptor::flatFaceOrEdge(), ijkMesh::nBoundaryFaces(), ijkMesh::nBoundaryFaces(), ijkMesh::nFaces(), ijkMesh::nInternalFaces(), ijkMesh::nPoints(), ijkMesh::pointLabel(), ijkMesh::pointLabel(), and blockDescriptor::vertex().

|
inlinenoexcept |
Return the (i,j,k) dimensions for modification.
Definition at line 94 of file ijkAddressing.H.
References Foam::noexcept.
|
inlinenoexcept |
Return the total i*j*k size.
Definition at line 62 of file ijkAddressingI.H.
References Foam::noexcept.
Referenced by checkSizes(), and ijkMesh::nCells().

|
inline |
The addressing dimension in the given direction.
Definition at line 69 of file ijkAddressingI.H.
|
inline |
Reset to (0,0,0) sizing.
Definition at line 78 of file ijkAddressingI.H.
|
inline |
Change the sizing parameters.
Definition at line 84 of file ijkAddressingI.H.
References checkSizes().

|
inline |
Change the sizing parameters.
Definition at line 101 of file ijkAddressingI.H.
References checkSizes().

|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 111 of file ijkAddressingI.H.
References checkIndex(), and k.
Referenced by block::block(), ijkMesh::cellLabel(), ijkMesh::cellLabel(), block::declareRunTimeSelectionTable(), namedBlock::namedBlock(), block::New(), and namedBlock::TypeNameNoDebug().


|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 126 of file ijkAddressingI.H.
References checkIndex(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
inline |
The (i,j,k) indexing from linear addressing.
Definition at line 136 of file ijkAddressingI.H.
|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 149 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, k, and Foam::nl.
Referenced by PDRblock::location::C(), checkIndex(), index(), index(), ijkMesh::pointLabel(), ijkMesh::pointLabel(), and PDRblock::location::width().


|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 183 of file ijkAddressingI.H.
References checkIndex(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
inline |
Check that all components of sizes() are non-negative.
Definition at line 193 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by ijkAddressing(), ijkAddressing(), reset(), and reset().


|
inline |
Check that all components of sizes() match.
Definition at line 216 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

|
inline |
Check that the total size matches.
Definition at line 228 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and size().
