48 pVectorsPtr_(nullptr),
64void 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;
Graphite solid properties.
Generic GeometricField class.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
const labelUList & neighbour() const
Internal face neighbour.
Least-squares gradient scheme vectors for the Finite Area method.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
virtual ~leastSquaresFaVectors()
Destructor.
const edgeVectorField & pVectors() const
Return reference to owner least square vectors.
const edgeVectorField & nVectors() const
Return reference to neighbour least square vectors.
virtual const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Template functions to aid in the implementation of demand driven data.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
#define DebugInFunction
Report an information message using Foam::Info.
GeometricField< vector, faePatchField, edgeMesh > edgeVectorField
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
faePatchField< scalar > faePatchScalarField
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
faePatchField< vector > faePatchVectorField
UList< label > labelUList
A UList of labels.
void deleteDemandDrivenData(DataPtr &dataPtr)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.