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_;
103 label own = owner[facei];
104 label nei = neighbour[facei];
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];
142 vector d = C[nei] - C[own];
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();
fvsPatchField< vector > fvsPatchVectorField
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
GeometricBoundaryField< vector, fvsPatchField, surfaceMesh > Boundary
Type of the boundary field.
Vector< scalar > vector
A scalar version of the templated Vector.
const dimensionSet dimless
GeometricField< vector, fvPatchField, volMesh > volVectorField
UList< label > labelUList
const dimensionSet dimLength
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
const labelUList & neighbour() const
Internal face neighbour.
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
defineTypeNameAndDebug(combustionModel, 0)
const labelUList & owner() const
Internal face owner.
virtual ~leastSquaresVectors()
Destructor.
Field< vector > vectorField
Specialisation of Field<T> for vector.
#define InfoInFunction
Report an information message using Foam::Info.