35 inline Foam::label Foam::Kmesh::index
43 return (
k + j*
nn[2] + i*
nn[1]*
nn[2]);
58 vector cellL = 2*(box.
max() - cornerCellCentre);
65 nn_[i] = label(l_[i]/cellL[i] + 0.5);
73 rdeltaByL[i] = nn_[i]/(l_[i]*l_[i]);
76 if (nTot !=
mesh.nCells())
79 <<
"calculated number of cells is incorrect" 83 for (label i=0; i<nn_[0]; i++)
87 for (label j=0; j<nn_[1]; j++)
91 for (label
k=0;
k<nn_[2];
k++)
95 (*this)[index(i, j,
k, nn_)] =
vector(k1, k2, k3);
104 cmptMag((*
this)[index(nn_[0]-1, nn_[1]-1, nn_[2]-1, nn_)]),
105 cmptMag((*
this)[index(0, 0, 0, nn_)])
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A bounding box defined in terms of min/max extrema points.
label k
Boltzmann constant.
Kmesh(const fvMesh &)
Construct from fvMesh.
#define forAll(list, i)
Loop across all elements in list.
const point & max() const noexcept
Maximum describing the bounding box.
constexpr scalar twoPi(2 *M_PI)
errorManip< error > abort(error &err)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const List< int > & nn() const
Mesh data needed to do the Finite Volume discretisation.
vector span() const
The bounding box span (from minimum to maximum)