Go to the documentation of this file.
46 pVectorsPtr_(nullptr),
62 void Foam::leastSquaresFaVectors::makeLeastSquaresVectors()
const
66 Info<<
"leastSquaresFaVectors::makeLeastSquaresVectors() :"
67 <<
"Constructing finite area least square gradient vectors"
76 mesh().pointsInstance(),
92 mesh().pointsInstance(),
116 label own = owner[facei];
117 label nei = neighbour[facei];
127 forAll(lsP.boundaryField(), patchi)
131 const faPatch&
p = pw.patch();
144 const vector& d = pd[patchFacei];
146 dd[edgeFaces[patchFacei]] +=
154 const vector& d = pd[patchFacei];
156 dd[edgeFaces[patchFacei]] +=
170 label own = owner[facei];
171 label nei = neighbour[facei];
174 scalar magSfByMagSqrd = 1.0/
magSqr(d);
176 lsP[facei] = magSfByMagSqrd*(invDd[own] & d);
177 lsN[facei] = -magSfByMagSqrd*(invDd[nei] & d);
180 forAll(lsP.boundaryField(), patchi)
186 const faPatch&
p = pw.patch();
196 const vector& d = pd[patchFacei];
198 patchLsP[patchFacei] =
200 *(invDd[edgeFaces[patchFacei]] & d);
207 const vector& d = pd[patchFacei];
209 patchLsP[patchFacei] =
211 *(invDd[edgeFaces[patchFacei]] & d);
218 Info<<
"leastSquaresFaVectors::makeLeastSquaresVectors() :"
219 <<
"Finished constructing finite area least square gradient vectors"
229 makeLeastSquaresVectors();
232 return *pVectorsPtr_;
240 makeLeastSquaresVectors();
243 return *nVectorsPtr_;
251 InfoIn(
"bool leastSquaresFaVectors::movePoints()")
252 <<
"Clearing least square data" <<
endl;
int debug
Static debugging option.
#define InfoIn(functionName)
Report an information message using Foam::Info.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
GeometricField< vector, faPatchField, areaMesh > areaVectorField
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
faePatchField< scalar > faePatchScalarField
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual ~leastSquaresFaVectors()
Destructor.
Least-squares gradient scheme vectors for the Finite Area method.
leastSquaresFaVectors(const faMesh &)
Construct given an faMesh.
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
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)
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.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)