A simple i-j-k (row-major order) to linear addressing. More...
Public Member Functions | |
| 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.
Definition at line 51 of file ijkAddressing.H.
|
inline |
Construct zero-size addressing.
Definition at line 30 of file ijkAddressingI.H.
|
inlineexplicit |
Construct with addressing.
Definition at line 36 of file ijkAddressingI.H.
References ijkAddressing::checkSizes().
|
inline |
Construct with addressing components.
Definition at line 47 of file ijkAddressingI.H.
|
inline |
Addressing is considered empty if any component is zero.
Definition at line 63 of file ijkAddressingI.H.
Referenced by ijkMesh::nBoundaryFaces(), ijkMesh::nFaces(), ijkMesh::nInternalFaces(), and ijkMesh::nPoints().
|
inline |
The (i,j,k) addressing dimensions.
Definition at line 69 of file ijkAddressingI.H.
Referenced by blockDescriptor::blockDescriptor(), blockDescriptor::density(), ijkMesh::nBoundaryFaces(), ijkMesh::nFaces(), ijkMesh::nInternalFaces(), and ijkMesh::nPoints().
|
inline |
Return the (i,j,k) dimensions for modification.
Definition at line 75 of file ijkAddressingI.H.
|
inline |
Return the total i*j*k size.
Definition at line 81 of file ijkAddressingI.H.
Referenced by ijkMesh::nCells().
|
inline |
The addressing dimension in the given direction.
Definition at line 89 of file ijkAddressingI.H.
|
inline |
|
inline |
Change the sizing parameters.
Definition at line 104 of file ijkAddressingI.H.
|
inline |
Change the sizing parameters.
Definition at line 120 of file ijkAddressingI.H.
|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 131 of file ijkAddressingI.H.
References k.
Referenced by ijkMesh::cellLabel().
|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 145 of file ijkAddressingI.H.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
inline |
The (i,j,k) indexing from linear addressing.
Definition at line 155 of file ijkAddressingI.H.
|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 169 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, k, and Foam::nl.
|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 203 of file ijkAddressingI.H.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
inline |
Check that all components of sizes() are non-negative.
Definition at line 212 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by ijkAddressing::ijkAddressing().
|
inline |
Check that all components of sizes() match.
Definition at line 235 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
inline |
Check that the total size matches.
Definition at line 247 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.