47 mesh_.pointsInstance(),
61 mesh_.pointsInstance(),
71 calcLeastSquaresVectors();
83 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
90 const fvMesh&
mesh = mesh_;
94 const labelUList& neighbour = mesh_.neighbour();
103 label own = owner[facei];
104 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 label own = owner[facei];
143 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);
172 <<
"Finished calculating least square gradient vectors" <<
endl;
179 calcLeastSquaresVectors();
#define forAll(list, i)
Loop across all elements in list.
GeometricBoundaryField< Type, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
Least-squares gradient scheme vectors.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
virtual ~leastSquaresVectors()
Destructor.
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define InfoInFunction
Report an information message using Foam::Info.
static const coefficient C("C", dimTemperature, 234.5)
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
const dimensionSet dimLength
Vector< scalar > vector
A scalar version of the templated Vector.
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
void inv(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
UList< label > labelUList
fvsPatchField< vector > fvsPatchVectorField