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];
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();
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)
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.
Least-squares gradient scheme vectors.
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.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
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)
Mesh data needed to do the Finite Volume discretisation.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const volVectorField & C() const
Return cell centres as volVectorField.
Defines the attributes of an object for which implicit objectRegistry management is supported...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)