47 mesh_.pointsInstance(),
61 mesh_.pointsInstance(),
71 calcLeastSquaresVectors();
83 void Foam::leastSquaresVectors::calcLeastSquaresVectors()
103 label own = owner[facei];
104 label nei = neighbour[facei];
106 vector d = C[nei] - C[own];
128 const vector& d = pd[patchFacei];
130 dd[faceCells[patchFacei]] +=
sqr(d)/
magSqr(d);
142 label own = owner[facei];
143 label nei = neighbour[facei];
145 vector d = C[nei] - C[own];
147 pVectors_[facei] = (invDd[own] & d)/
magSqr(d);
148 nVectors_[facei] = -(invDd[nei] & d)/
magSqr(d);
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();
Graphite solid properties.
#define forAll(list, i)
Loop across all elements in list.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
const dimensionSet dimless
Least-squares gradient scheme vectors.
const dimensionSet dimLength
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
const labelUList & neighbour() const
Internal face neighbour.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
const labelUList & faceCells() const
Return face-cell addressing.
virtual const labelUList & faceCells() const
Return faceCells.
const polyPatch & patch() const
Return the polyPatch.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
const labelUList & owner() const
Internal face owner.
const fvPatch & patch() const
Return patch.
const fvMesh & mesh() const
virtual ~leastSquaresVectors()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual tmp< vectorField > delta() const
Return cell-centre to face-centre vector.
#define InfoInFunction
Report an information message using Foam::Info.