Go to the documentation of this file.
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 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()
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Ostream & endl(Ostream &os)
virtual bool movePoints()
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)
Generic templated field type.
fvsPatchField< vector > fvsPatchVectorField
leastSquaresVectors(const fvMesh &)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
const volVectorField & C() const
Least-squares gradient scheme vectors.
Generic dimensioned Type class.
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)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
const dimensionSet dimless