47 mesh_.pointsInstance(),
61 mesh_.pointsInstance(),
71 calcLeastSquaresVectors();
83 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
90 const fvMesh& mesh = mesh_;
94 const labelUList& neighbour = mesh_.neighbour();
103 label own = owner[facei];
104 label nei = neighbour[facei];
114 pVectors_.boundaryField();
120 const fvPatch&
p = patchLsP.patch();
121 const labelUList& faceCells =
p.patch().faceCells();
128 const vector& d = pd[patchFacei];
130 dd[faceCells[patchFacei]] +=
sqr(d)/
magSqr(d);
142 label own = owner[facei];
143 label nei = neighbour[facei];
147 pVectors_[facei] = (invDd[own] & d)/
magSqr(d);
148 nVectors_[facei] = -(invDd[nei] & d)/
magSqr(d);
155 const fvPatch&
p = patchLsP.patch();
163 const vector& d = pd[patchFacei];
165 patchLsP[patchFacei] = (invDd[faceCells[patchFacei]] & d)/
magSqr(d);
172 <<
"Finished calculating least square gradient vectors" <<
endl;
179 calcLeastSquaresVectors();
static const Foam::dimensionedScalar C("C", Foam::dimTemperature, 234.5)
#define forAll(list, i)
Loop across all elements in list.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Mesh data needed to do the Finite Volume discretisation.
Least-squares gradient scheme vectors.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
virtual ~leastSquaresVectors()
Destructor.
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
#define InfoInFunction
Report an information message using Foam::Info.
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
const dimensionSet dimLength
Vector< scalar > vector
A scalar version of the templated Vector.
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
UList< label > labelUList
fvsPatchField< vector > fvsPatchVectorField
dimensioned< scalar > magSqr(const dimensioned< Type > &)