47void Foam::pointVolInterpolation::makeWeights()
const
52 <<
"weighting factors already calculated"
58 Info<<
"pointVolInterpolation::makeWeights() : "
59 <<
"constructing weighting factors"
69 std::make_unique<FieldField<Field, scalar>>(cellCentres.size());
71 auto& weightingFactors = *volWeightsPtr_;
73 forAll(weightingFactors, pointi)
75 weightingFactors.emplace_set
78 cellPoints[pointi].size()
87 const labelList& curCellPoints = cellPoints[cellI];
89 forAll(curCellPoints, cellPointI)
91 weightingFactors[cellI][cellPointI] = 1.0/
94 cellCentres[cellI] -
points[curCellPoints[cellPointI]]
102 forAll(cellCentres, cellI)
104 const labelList& curCellPoints = cellPoints[cellI];
106 forAll(curCellPoints, cellPointI)
108 pointVolSumWeights[cellI] += weightingFactors[cellI][cellPointI];
112 forAll(cellCentres, cellI)
114 const labelList& curCellPoints = cellPoints[cellI];
116 forAll(curCellPoints, cellPointI)
118 weightingFactors[cellI][cellPointI] /= pointVolSumWeights[cellI];
124 Info<<
"pointVolInterpolation::makeWeights() : "
125 <<
"finished constructing weighting factors"
132void Foam::pointVolInterpolation::clearAddressing()
const
134 patchInterpolators_.clear();
139void Foam::pointVolInterpolation::clearGeom()
const
141 volWeightsPtr_.reset(
nullptr);
145const Foam::PtrList<Foam::primitivePatchInterpolation>&
146Foam::pointVolInterpolation::patchInterpolators()
const
148 if (patchInterpolators_.empty())
152 patchInterpolators_.
resize(bdry.size());
156 patchInterpolators_.emplace_set
164 return patchInterpolators_;
202 return *volWeightsPtr_;
A field of fields is a PtrList of fields with reference counting.
void resize(const label newLen)
Adjust size of PtrList.
A fvBoundaryMesh is a fvPatch list with a reference to the associated fvMesh, with additional search ...
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.
pointVolInterpolation(const pointMesh &, const fvMesh &)
Construct given pointMesh and fvMesh.
const fvMesh & vMesh() const noexcept
~pointVolInterpolation()
Destructor.
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
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)
errorManip< error > abort(error &err)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.