Go to the documentation of this file.
50 mesh_.pointsInstance(),
64 mesh_.pointsInstance(),
74 calcLeastSquaresVectors();
86 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
94 const labelUList& neighbour = mesh_.neighbour();
103 const label own = owner[facei];
104 const label nei = neighbour[facei];
113 surfaceVectorField::Boundary& blsP =
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 const label own = owner[facei];
143 const 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);
169 DebugInfo <<
"Finished calculating least square gradient vectors" <<
endl;
175 calcLeastSquaresVectors();
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual ~leastSquaresVectors()
Destructor.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
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)
fvsPatchField< vector > fvsPatchVectorField
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
#define DebugInFunction
Report an information message using Foam::Info.
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
#define DebugInfo
Report an information message using Foam::Info.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
UList< label > labelUList
A UList of labels.
Graphite solid properties.
defineTypeNameAndDebug(combustionModel, 0)
const dimensionSet dimless
Dimensionless.