37#ifndef Foam_ijkAddressing_H
38#define Foam_ijkAddressing_H
71 inline ijkAddressing(
const label ni,
const label nj,
const label nk);
79 inline bool empty()
const noexcept;
88 inline label
size()
const noexcept;
97 inline void reset(
const label ni,
const label nj,
const label nk);
103 inline label
index(
const label i,
const label j,
const label
k)
const;
121 const bool allowExtra =
false
129 const bool allowExtra =
false
139 inline void checkSizes(
const label nTotal)
const;
void checkIndex(const label i, const label j, const label k, const bool allowExtra=false) const
Check indices are within ni,nj,nk range.
ijkAddressing()
Construct zero-size addressing.
label index(const label i, const label j, const label k) const
Linear addressing index (offset) for an (i,j,k) position.
bool empty() const noexcept
Addressing is considered empty if any component is zero.
const labelVector & sizes() const noexcept
The (i,j,k) addressing dimensions.
label size() const noexcept
Return the total i*j*k size.
void checkSizes() const
Check that all components of sizes() are non-negative.
void reset(const label ni, const label nj, const label nk)
Change the sizing parameters.
void clear()
Reset to (0,0,0) sizing.
labelVector & sizes() noexcept
Return the (i,j,k) dimensions for modification.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
Vector< label > labelVector
Vector of labels.