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());
122 return 0.5*(operator[](i+1) + operator[](i));
126 inline 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 centre() const
Mid-point location, zero for an empty list.
const scalar & max() const
The last() value is considered the max value.
point C(const label i, const label j, const label k) const
Cell centre at i,j,k position.
const scalar & clip(const scalar &val) const
If out of range, return the respective min/max limits, otherwise return the value itself...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
scalar V(const label i, const label j, const label k) const
Cell volume at i,j,k position.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void checkIndex(const label i) const
Check that element index is within valid range.
constexpr char nl
The newline '\n' character (0x0a)
label nCells() const
The number of mesh cells (nx*ny*nz) in the i-j-k mesh.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
const scalar & min() const
The first() value is considered the min value.
vector span(const label i, const label j, const label k) const
Cell dimensions at i,j,k position.
A traits class, which is primarily used for primitives and vector-space.
const Cmpt & y() const noexcept
Access to the vector y component.
label k
Boltzmann constant.
label nCells() const noexcept
The number of cells in this direction.
bool contains(const scalar p) const
True if the location is within the range.
bool good() const noexcept
The location list is valid if it contains 2 or more points.
scalar dz(const label k) const
Cell size in z-direction at k position.
dimensionedScalar cbrt(const dimensionedScalar &ds)
scalar width(const label i, const label j, const label k) const
Characteristic cell size at i,j,k position.
errorManip< error > abort(error &err)
void checkIndex(const label i, const label j, const label k, const bool allowExtra=false) const
Check indices are within ni,nj,nk range.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label size() const noexcept
The number of elements in the container.
const Cmpt & x() const noexcept
Access to the vector x component.
scalar length() const
The difference between min/max values, zero for an empty list.
scalar dy(const label j) const
Cell size in y-direction at j position.
scalar width(const label i) const
Cell size at element position.
const Cmpt & z() const noexcept
Access to the vector z component.
vector point
Point is a vector.
scalar C(const label i) const
Cell centre at element position.
scalar dx(const label i) const
Cell size in x-direction at i position.
label nPoints() const noexcept
The number of points in this direction.
const Vector< location > & grid() const noexcept
The grid point locations in the i,j,k (x,y,z) directions.