Go to the documentation of this file.
48 pVectorsPtr_(nullptr),
64 void Foam::leastSquaresFaVectors::makeLeastSquaresVectors()
const
67 <<
"Constructing finite area least square gradient vectors" <<
nl;
74 mesh().pointsInstance(),
90 mesh().pointsInstance(),
114 label own = owner[facei];
115 label nei = neighbour[facei];
129 const faPatch&
p = pw.patch();
142 const vector& d = pd[patchFacei];
144 dd[edgeFaces[patchFacei]] +=
152 const vector& d = pd[patchFacei];
154 dd[edgeFaces[patchFacei]] +=
168 label own = owner[facei];
169 label nei = neighbour[facei];
172 scalar magSfByMagSqrd = 1.0/
magSqr(d);
174 lsP[facei] = magSfByMagSqrd*(invDd[own] & d);
175 lsN[facei] = -magSfByMagSqrd*(invDd[nei] & d);
184 const faPatch&
p = pw.patch();
194 const vector& d = pd[patchFacei];
196 patchLsP[patchFacei] =
198 *(invDd[edgeFaces[patchFacei]] & d);
205 const vector& d = pd[patchFacei];
207 patchLsP[patchFacei] =
209 *(invDd[edgeFaces[patchFacei]] & d);
215 <<
"Done constructing finite area least square gradient vectors" <<
nl;
223 makeLeastSquaresVectors();
226 return *pVectorsPtr_;
234 makeLeastSquaresVectors();
237 return *nVectorsPtr_;
244 <<
"Clearing least square data" <<
nl;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< vector, faePatchField, edgeMesh > edgeVectorField
static constexpr const zero Zero
Global zero (0)
Template functions to aid in the implementation of demand driven data.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
faePatchField< vector > faePatchVectorField
#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)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
void deleteDemandDrivenData(DataPtr &dataPtr)
faePatchField< scalar > faePatchScalarField
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
#define DebugInFunction
Report an information message using Foam::Info.
virtual ~leastSquaresFaVectors()
Destructor.
Least-squares gradient scheme vectors for the Finite Area method.
leastSquaresFaVectors(const faMesh &)
Construct given an faMesh.
const labelUList & neighbour() const
Internal face neighbour.
Vector< scalar > vector
A scalar version of the templated Vector.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
const edgeVectorField & pVectors() const
Return reference to owner least square vectors.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
virtual const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
Finite area mesh. Used for 2-D non-Euclidian finite area method.
const edgeVectorField & nVectors() const
Return reference to neighbour least square vectors.
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 Boundary & boundaryField() const
Return const-reference to the boundary field.