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++)
89 for (
label k=0; k<nn_[2]; k++)
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A bounding box defined in terms of the points at its extremities.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Vector< scalar > vector
A scalar version of the templated Vector.
Kmesh(const fvMesh &)
Construct from fvMesh.
dimensionSet cmptMag(const dimensionSet &)
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
const scalar twoPi(2 *pi)
const point & max() const
Maximum point defining the bounding box.
const boundBox & bounds() const
Return mesh bounding box.
Mesh data needed to do the Finite Volume discretisation.
vector span() const
The bounding box span (from minimum to maximum)
dimensioned< scalar > mag(const dimensioned< Type > &)
const volVectorField & C() const
Return cell centres.
label size() const
Return the number of elements in the UList.