Go to the documentation of this file.
45 return (scalarList::size() > 1);
51 return (scalarList::size()-1);
57 return scalarList::size();
63 return (scalarList::size() > 1 && first() <=
p &&
p <= last());
81 return scalarList::empty() ? 0 : (0.5*first() + 0.5*last());
87 if (i < 0 || i >= nCells())
91 <<
" is out of range [0," << nCells() <<
']' <<
nl
103 return (
operator[](i+1) -
operator[](i));
116 return first() - 0.5*(operator[](1) - first());
118 else if (i > 1 && i == scalarList::size()-1)
121 return last() + 0.5*(last() - operator[](scalarList::size()-2));
128 return 0.5*(operator[](i+1) + operator[](i));
132 inline const Foam::scalar&
135 if (scalarList::size())
141 else if (last() < val)
172 return grid_.x().width(i);
178 return grid_.x().width(ijk.
x());
184 return grid_.y().width(j);
190 return grid_.y().width(ijk.
y());
196 return grid_.z().width(
k);
202 return grid_.z().width(ijk.
z());
213 return vector(dx(i), dy(j), dz(
k));
219 return vector(dx(ijk), dy(ijk), dz(ijk));
230 return point(grid_.x()[i], grid_.y()[j], grid_.z()[
k]);
253 return point(grid_.x().C(i), grid_.y().C(j), grid_.z().C(
k));
262 grid_.x().C(ijk.
x()),
263 grid_.y().C(ijk.
y()),
276 return dx(i)*dy(j)*dz(
k);
282 return dx(ijk.
x())*dy(ijk.
y())*dz(ijk.
z());
scalar width(const label i, const label j, const label k) const
Characteristic cell size at i,j,k position.
scalar dz(const label k) const
Cell size in z-direction at k position.
const Cmpt & x() const
Access to the vector x component.
bool valid() const
The locations are valid if they contain 2 or more points.
scalar dy(const label j) const
Cell size in y-direction at j position.
static constexpr const zero Zero
Global zero (0)
bool contains(const scalar p) const
True if the location is within the range.
const scalar & minEdgeLen() const
The min edge length.
void checkIndex(const label i) const
Check that element index is within valid range.
const scalar & min() const
The first() value is considered the min value.
const boundBox & bounds() const
The mesh bounding box.
const Cmpt & z() const
Access to the vector z component.
const scalar & clip(const scalar &val) const
scalar dx(const label i) const
Cell size in x-direction at i position.
A simple i-j-k (row-major order) to linear addressing for a rectilinear mesh. Since the underlying me...
point C(const label i, const label j, const label k) const
Cell centre at i,j,k position.
scalar centre() const
Mid-point location, zero for an empty list.
scalar V(const label i, const label j, const label k) const
Cell volume at i,j,k position.
const Vector< location > & grid() const
The grid point locations in the i,j,k (x,y,z) directions.
label nPoints() const
The number of points in this direction.
errorManip< error > abort(error &err)
Vector< scalar > vector
A scalar version of the templated Vector.
scalar width(const label i) const
Cell size at element position.
vector span(const label i, const label j, const label k) const
Cell dimensions at i,j,k position.
const Cmpt & y() const
Access to the vector y component.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Traits class for primitives.
label k
Boltzmann constant.
A bounding box defined in terms of min/max extrema points.
vector point
Point is a vector.
dimensionedScalar cbrt(const dimensionedScalar &ds)
label nCells() const
The number of cells in this direction.
const scalar & max() const
The last() value is considered the max value.
PDRblock()
Construct zero-size.
scalar C(const label i) const
Cell centre at element position.