Go to the documentation of this file.
33 return (scalarList::size() > 1);
39 return (scalarList::size()-1);
45 return scalarList::size();
51 return (scalarList::size() > 1 && first() <=
p &&
p <= last());
69 return scalarList::empty() ? 0 : (0.5*first() + 0.5*last());
75 return scalarList::empty() ? 0 :
mag(last() - first());
81 if (i < 0 || i >=
nCells())
85 <<
" is out of range [0," <<
nCells() <<
']' <<
nl
97 return (
operator[](i+1) -
operator[](i));
110 return first() - 0.5*(operator[](1) - first());
112 else if (i > 1 && i == scalarList::size()-1)
115 return last() + 0.5*(last() - operator[](scalarList::size()-2));
122 return 0.5*(operator[](i+1) + operator[](i));
126 inline const Foam::scalar&
129 if (scalarList::size())
135 else if (last() < val)
168 return grid_.x().width(i);
174 return grid_.x().width(ijk.
x());
180 return grid_.y().width(j);
186 return grid_.y().width(ijk.
y());
192 return grid_.z().width(
k);
198 return grid_.z().width(ijk.
z());
226 return point(grid_.x()[i], grid_.y()[j], grid_.z()[
k]);
249 return point(grid_.x().C(i), grid_.y().C(j), grid_.z().C(
k));
258 grid_.x().C(ijk.
x()),
259 grid_.y().C(ijk.
y()),
278 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 location list is valid if it contains 2 or more points.
scalar dy(const label j) const
Cell size in y-direction at j position.
bool contains(const scalar p) const
True if the location is within the range.
void checkIndex(const label i) const
Check that element index is within valid range.
void checkIndex(const label i, const label j, const label k, const bool allowExtra=false) const
Check indices are within ni,nj,nk 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.
scalar length() const
The difference between min/max values, zero for an empty list.
const scalarMinMax & edgeLimits() const
The min/max edge length.
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.
label nCells() const
The number of mesh cells (nx*ny*nz) in the i-j-k mesh.
Traits class for primitives.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
scalar C(const label i) const
Cell centre at element position.