48void Foam::pointVolInterpolation::makeWeights()
const
53 <<
"weighting factors already calculated"
59 Info<<
"pointVolInterpolation::makeWeights() : "
60 <<
"constructing weighting factors"
69 volWeightsPtr_ =
new FieldField<Field, scalar>(cellCentres.size());
70 FieldField<Field, scalar>& weightingFactors = *volWeightsPtr_;
72 forAll(weightingFactors, pointi)
86 const labelList& curCellPoints = cellPoints[cellI];
88 forAll(curCellPoints, cellPointI)
90 weightingFactors[cellI][cellPointI] = 1.0/
93 cellCentres[cellI] -
points[curCellPoints[cellPointI]]
101 forAll(cellCentres, cellI)
103 const labelList& curCellPoints = cellPoints[cellI];
105 forAll(curCellPoints, cellPointI)
107 pointVolSumWeights[cellI] += weightingFactors[cellI][cellPointI];
111 forAll(cellCentres, cellI)
113 const labelList& curCellPoints = cellPoints[cellI];
115 forAll(curCellPoints, cellPointI)
117 weightingFactors[cellI][cellPointI] /= pointVolSumWeights[cellI];
123 Info<<
"pointVolInterpolation::makeWeights() : "
124 <<
"finished constructing weighting factors"
131void Foam::pointVolInterpolation::clearAddressing()
const
138void Foam::pointVolInterpolation::clearGeom()
const
145Foam::pointVolInterpolation::patchInterpolators()
const
147 if (!patchInterpolatorsPtr_)
149 const fvBoundaryMesh& bdry = vMesh().boundary();
151 patchInterpolatorsPtr_ =
152 new PtrList<primitivePatchInterpolation>(bdry.size());
156 patchInterpolatorsPtr_->set
164 return *patchInterpolatorsPtr_;
178 volWeightsPtr_(nullptr),
179 patchInterpolatorsPtr_(nullptr)
204 return *volWeightsPtr_;
A field of fields is a PtrList of fields with reference counting.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Mesh data needed to do the Finite Volume discretisation.
Mesh representing a set of points created from polyMesh.
bool movePoints()
Correct weighting factors for moving mesh.
const FieldField< Field, scalar > & volWeights() const
Return reference to weights arrays.
const fvMesh & vMesh() const
void updateTopology()
Update mesh topology using the morph engine.
virtual const pointField & points() const
Return raw points.
const vectorField & cellCentres() const
const labelListList & cellPoints() const
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
PrimitivePatchInterpolation< primitivePatch > primitivePatchInterpolation
Foam::primitivePatchInterpolation.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
List< labelList > labelListList
A List of labelList.
errorManip< error > abort(error &err)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0)
void deleteDemandDrivenData(DataPtr &dataPtr)
#define forAll(list, i)
Loop across all elements in list.