Go to the documentation of this file.
49 mesh_.pointsInstance(),
63 mesh_.pointsInstance(),
73 calcLeastSquaresVectors();
85 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
92 const fvMesh&
mesh = mesh_;
96 const labelUList& neighbour = mesh_.neighbour();
105 label own = owner[facei];
106 label nei = neighbour[facei];
115 surfaceVectorField::Boundary& blsP =
116 pVectors_.boundaryField();
122 const fvPatch&
p = patchLsP.patch();
123 const labelUList& faceCells =
p.patch().faceCells();
130 const vector& d = pd[patchFacei];
132 dd[faceCells[patchFacei]] +=
sqr(d)/
magSqr(d);
144 label own = owner[facei];
145 label nei = neighbour[facei];
149 pVectors_[facei] = (invDd[own] & d)/
magSqr(d);
150 nVectors_[facei] = -(invDd[nei] & d)/
magSqr(d);
157 const fvPatch&
p = patchLsP.patch();
165 const vector& d = pd[patchFacei];
167 patchLsP[patchFacei] = (invDd[faceCells[patchFacei]] & d)/
magSqr(d);
174 <<
"Finished calculating least square gradient vectors" <<
endl;
181 calcLeastSquaresVectors();
int debug
Static debugging option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
virtual ~leastSquaresVectors()
Destructor.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
#define forAll(list, i)
Loop across all elements in list.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fvsPatchField< vector > fvsPatchVectorField
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
const volVectorField & C() const
Return cell centres as volVectorField.
Least-squares gradient scheme vectors.
Mesh data needed to do the Finite Volume discretisation.
Vector< scalar > vector
A scalar version of the templated Vector.
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
UList< label > labelUList
A UList of labels.
defineTypeNameAndDebug(combustionModel, 0)