41 return (
k + j*
nn[2] + i*
nn[1]*
nn[2]);
56 vector cellL = 2*(box.
max() - cornerCellCentre);
63 nn_[i] =
label(l_[i]/cellL[i] + 0.5);
71 rdeltaByL[i] = nn_[i]/(l_[i]*l_[i]);
77 <<
"calculated number of cells is incorrect"
81 for (
label i=0; i<nn_[0]; i++)
85 for (
label j=0; j<nn_[1]; j++)
93 (*this)[index(i, j,
k, nn_)] =
vector(k1, k2, k3);
102 cmptMag((*
this)[index(nn_[0]-1, nn_[1]-1, nn_[2]-1, nn_)]),
103 cmptMag((*
this)[index(0, 0, 0, nn_)])
#define forAll(list, i)
Loop across all elements in list.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
const labelList & nn() const
Kmesh(const fvMesh &)
Construct from fvMesh.
A bounding box defined in terms of the points at its extremities.
const point & max() const
Maximum point defining the bounding box.
vector span() const
The bounding box span (from minimum to maximum)
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
const boundBox & bounds() const
Return mesh bounding box.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const scalar twoPi(2 *pi)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionSet cmptMag(const dimensionSet &)