41 MeshObject<fvMesh,
Foam::MoveableMeshObject, leastSquaresVectors>(mesh),
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];
113 pVectors_.boundaryField();
119 const fvPatch&
p = patchLsP.patch();
120 const labelUList& faceCells =
p.patch().faceCells();
127 dd[faceCells[patchFacei]] +=
sqr(pd[patchFacei]);
139 label own = owner[facei];
140 label nei = neighbour[facei];
144 pVectors_[facei] = (invDd[own] & d);
145 nVectors_[facei] = -(invDd[nei] & d);
152 const fvPatch&
p = patchLsP.patch();
160 patchLsP[patchFacei] =
161 (invDd[faceCells[patchFacei]] & pd[patchFacei]);
168 <<
"Finished calculating least square gradient vectors" <<
endl;
175 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.
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)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
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