47 void 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" 132 void Foam::pointVolInterpolation::clearAddressing()
const 134 patchInterpolators_.clear();
139 void Foam::pointVolInterpolation::clearGeom()
const 141 volWeightsPtr_.reset(
nullptr);
146 Foam::pointVolInterpolation::patchInterpolators()
const 148 if (patchInterpolators_.empty())
150 const fvBoundaryMesh& bdry = vMesh().boundary();
152 patchInterpolators_.resize(bdry.size());
156 patchInterpolators_.emplace_set
164 return patchInterpolators_;
202 return *volWeightsPtr_;
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< labelList > labelListList
List of labelList.
A field of fields is a PtrList of fields with reference counting.
virtual const pointField & points() const
Return raw points.
Mesh representing a set of points created from polyMesh.
#define forAll(list, i)
Loop across all elements in list.
void updateTopology()
Update mesh topology using the morph engine.
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const FieldField< Field, scalar > & volWeights() const
Return reference to weights arrays.
pointVolInterpolation(const pointMesh &, const fvMesh &)
Construct given pointMesh and fvMesh.
bool movePoints()
Correct weighting factors for moving mesh.
const vectorField & cellCentres() const
errorManip< error > abort(error &err)
int debug
Static debugging option.
~pointVolInterpolation()
Destructor.
defineTypeNameAndDebug(combustionModel, 0)
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.
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const fvMesh & vMesh() const noexcept
List< label > labelList
A List of labels.
const labelListList & cellPoints() const
static constexpr const zero Zero
Global zero (0)