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 47 of file ijkAddressing.H.
|
inline |
Construct zero-size addressing.
Definition at line 23 of file ijkAddressingI.H.
|
inlineexplicit |
Construct with addressing.
Definition at line 29 of file ijkAddressingI.H.
References ijkAddressing::checkSizes().
|
inline |
Construct with addressing components.
Definition at line 40 of file ijkAddressingI.H.
|
inline |
Addressing is considered empty if any component is zero.
Definition at line 56 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 62 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 68 of file ijkAddressingI.H.
|
inline |
Return the total i*j*k size.
Definition at line 74 of file ijkAddressingI.H.
Referenced by ijkMesh::nCells().
|
inline |
The addressing dimension in the given direction.
Definition at line 82 of file ijkAddressingI.H.
|
inline |
|
inline |
Change the sizing parameters.
Definition at line 97 of file ijkAddressingI.H.
|
inline |
Change the sizing parameters.
Definition at line 113 of file ijkAddressingI.H.
|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 124 of file ijkAddressingI.H.
References k.
Referenced by ijkMesh::cellLabel().
|
inline |
Linear addressing index (offset) for an (i,j,k) position.
Definition at line 138 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 148 of file ijkAddressingI.H.
|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 162 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, k, and Foam::nl.
Referenced by PDRblock::location::C(), and PDRblock::location::width().
|
inline |
Check indices are within ni,nj,nk range.
Optionally allow an extra index for point addressing
Definition at line 196 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 205 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 228 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
inline |
Check that the total size matches.
Definition at line 240 of file ijkAddressingI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.