Go to the documentation of this file.
65 return (!sizes_.x() || !sizes_.y() || !sizes_.z());
84 return (sizes_.x() * sizes_.y() * sizes_.z());
141 return (i + (sizes_.x() * (j + (sizes_.y() *
k))));
151 return (ijk.
x() + (sizes_.x() * (ijk.
y() + (sizes_.y() * ijk.
z()))));
163 idx / (sizes_.x() * sizes_.y())
173 const bool allowExtra
176 const label extra = (allowExtra ? 1 : 0);
178 if (i < 0 || i >= (sizes_.x() + extra))
181 <<
"The i-index " << i
182 <<
" is out of range [0," << (sizes_.x() + extra) <<
']' <<
nl
185 if (j < 0 || j >= (sizes_.y() + extra))
188 <<
"The j-index " << j
189 <<
" is out of range [0," << (sizes_.y() + extra) <<
']' <<
nl
192 if (k < 0 || k >= (sizes_.z() + extra))
195 <<
"The k-index " <<
k
196 <<
" is out of range [0," << (sizes_.z() + extra) <<
']' <<
nl
205 const bool allowExtra
208 checkIndex(ijk.
x(), ijk.
y(), ijk.
z(), allowExtra);
217 <<
"The i-size is negative" <<
nl
223 <<
"The j-size is negative" <<
nl
229 <<
"The k-size is negative" <<
nl
240 <<
"The i-j-k sizes are different. "
241 << sizes_ <<
" vs. " << other <<
nl
249 if (size() != nTotal)
252 <<
"The total size is different. "
253 << size() <<
" vs. " << nTotal <<
nl
const Cmpt & x() const
Access to the vector x component.
static constexpr const zero Zero
Global zero (0)
const labelVector & sizes() const
The (i,j,k) addressing dimensions.
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 clear()
Reset to (0,0,0) sizing.
const Cmpt & z() const
Access to the vector z component.
components
Component labeling enumeration.
Vector< label > labelVector
Vector of labels.
ijkAddressing()
Construct zero-size addressing.
void reset(const label ni, const label nj, const label nk)
Change the sizing parameters.
label size() const
Return the total i*j*k size.
errorManip< error > abort(error &err)
const Cmpt & y() const
Access to the vector y component.
bool empty() const
Addressing is considered empty if any component is zero.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label index(const label i, const label j, const label k) const
Linear addressing index (offset) for an (i,j,k) position.
label k
Boltzmann constant.
void checkSizes() const
Check that all components of sizes() are non-negative.