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];
125 forAll(lsP.boundaryField(), patchi)
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);
178 forAll(lsP.boundaryField(), patchi)
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 dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< vector, faePatchField, edgeMesh > edgeVectorField
static constexpr const zero Zero
Template functions to aid in the implementation of demand driven data.
virtual bool movePoints()
faePatchField< vector > faePatchVectorField
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.
GeometricField< vector, faPatchField, areaMesh > areaVectorField
void deleteDemandDrivenData(DataPtr &dataPtr)
Generic templated field type.
faePatchField< scalar > faePatchScalarField
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual ~leastSquaresFaVectors()
Least-squares gradient scheme vectors for the Finite Area method.
leastSquaresFaVectors(const faMesh &)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
const labelUList & neighbour() const
Vector< scalar > vector
A scalar version of the templated Vector.
const labelUList & owner() const
const edgeVectorField & pVectors() const
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
virtual const surfaceScalarField & weights() const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Finite area mesh. Used for 2-D non-Euclidian finite area method.
const edgeVectorField & nVectors() const
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
const dimensionSet dimless