81 if (i < 0 || i >=
nCells())
85 <<
" is out of range [0," <<
nCells() <<
']' <<
nl
97 return (
operator[](i+1) -
operator[](i));
110 return front() - 0.5*(operator[](1) - front());
126inline const Foam::scalar&
135 else if (back() < val)
149 return grid_.x().width(i);
155 return grid_.x().width(ijk.
x());
161 return grid_.y().width(j);
167 return grid_.y().width(ijk.
y());
173 return grid_.z().width(
k);
179 return grid_.z().width(ijk.
z());
207 return point(grid_.x()[i], grid_.y()[j], grid_.z()[
k]);
230 return point(grid_.x().C(i), grid_.y().C(j), grid_.z().C(
k));
239 grid_.x().C(ijk.
x()),
240 grid_.y().C(ijk.
y()),
259 return dx(ijk.
x())*
dy(ijk.
y())*
dz(ijk.
z());
scalar length() const
The difference between min/max values, zero for an empty list.
void checkIndex(const label i) const
Check that element index is within valid range.
const scalar & clamp(const scalar &val) const
Return value clamped to min/max limits.
scalar C(const label i) const
Cell centre at element position.
bool good() const noexcept
The location list is valid if it contains 2 or more points.
scalar centre() const
Mid-point location, zero for an empty list.
label nPoints() const noexcept
The number of points in this direction.
const scalar & min() const
The first() value is considered the min value.
label nCells() const noexcept
The number of cells in this direction.
const scalar & max() const
The last() value is considered the max value.
scalar width(const label i) const
Cell size at element position.
bool contains(const scalar p) const
True if the location is within the range.
scalar V(const label i, const label j, const label k) const
Cell volume at i,j,k position.
scalar dx(const label i) const
Cell size in x-direction at i position.
point C(const label i, const label j, const label k) const
Cell centre at i,j,k position.
vector span(const label i, const label j, const label k) const
Cell dimensions at i,j,k position.
const Vector< location > & grid() const noexcept
The grid point locations in the i,j,k (x,y,z) directions.
scalar dy(const label j) const
Cell size in y-direction at j position.
scalar dz(const label k) const
Cell size in z-direction at k position.
scalar width(const label i, const label j, const label k) const
Characteristic cell size at i,j,k position.
bool empty() const noexcept
label size() const noexcept
scalar & operator[](const label i)
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
void checkIndex(const label i, const label j, const label k, const bool allowExtra=false) const
Check indices are within ni,nj,nk range.
label nCells() const
The number of mesh cells (nx*ny*nz) in the i-j-k mesh.
A traits class, which is primarily used for primitives and vector-space.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Vector< label > labelVector
Vector of labels.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
vector point
Point is a vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedScalar cbrt(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).