44 MeshObject<fvMesh,
Foam::MoveableMeshObject, leastSquaresVectors>(
mesh),
50 mesh_.pointsInstance(),
64 mesh_.pointsInstance(),
74 calcLeastSquaresVectors();
86 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
90 const fvMesh&
mesh = mesh_;
94 const labelUList& neighbour = mesh_.neighbour();
103 const label own = owner[facei];
104 const label nei = neighbour[facei];
113 pVectors_.boundaryField();
119 const fvPatch&
p = patchLsP.patch();
120 const labelUList& faceCells =
p.patch().faceCells();
127 dd[faceCells[patchFacei]] += pdSqr[patchFacei];
139 const label own = owner[facei];
140 const 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]);
166 <<
"Finished calculating least square gradient vectors" <<
endl;
172 calcLeastSquaresVectors();
fvsPatchField< vector > fvsPatchVectorField
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
constexpr char nl
The newline '\n' character (0x0a)
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 boundary fields.
const dimensionSet dimless
Dimensionless.
GeometricField< vector, fvPatchField, volMesh > volVectorField
UList< label > labelUList
A UList of labels.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
#define forAll(list, i)
Loop across all elements in list.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
#define DebugInFunction
Report an information message using Foam::Info.
#define DebugInfo
Report an information message using Foam::Info.
defineTypeNameAndDebug(combustionModel, 0)
virtual ~leastSquaresVectors()
Destructor.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0)