85 reset(facesToMove, counts, pointDisplacement);
99 for (
const auto&
pp : pMesh.boundary())
101 const auto& mp =
pp.meshPoints();
105 const auto& pc = mppPtr->constraints();
108 nConstraints[mp[i]] = pc[i].first();
117 pp.applyConstraint(i, pc);
118 nConstraints[mp[i]] = pc.first();
128 forAll(pointEdges, pointi)
130 if (isMovingPoint[pointi])
132 const auto& pEdges = pointEdges[pointi];
133 for (
const label edgei : pEdges)
135 const label otherPointi = edges[edgei].otherVertex(pointi);
136 if (nConstraints[otherPointi] >= nConstraints[pointi])
138 pointDisplacement[pointi] +=
139 currentPoints[otherPointi]
149 average(facesToMove, counts, pointDisplacement);
156 if (isMovingPoint[pointi] && !counts[pointi])
158 pointDisplacement[pointi] = currentPoints[pointi]-oldPoints[pointi];
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
const T1 & first() const noexcept
Access the first element.
T & first()
Access first element of the list, position [0].
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Accumulates point constraints through successive applications of the applyConstraint function.
Abstract base class for point smoothing methods. Handles parallel communication via reset and average...
void reset(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement, const bool resetInternalFaces=true) const
Reset the relevant weights and displacements to zero.
bitSet pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get list of the points to be moved.
void average(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement) const
Average the displacements using the weights provided.
const polyMesh & mesh() const noexcept
Access the mesh.
laplacianConstraintPointSmoother(const polyMesh &mesh, const dictionary &dict)
Construct from a dictionary and a polyMesh.
virtual void calculate(const labelList &facesToMove, const pointField &oldPoints, const pointField ¤tPoints, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes, vectorField &pointDisplacement) const
Calculate the point displacement.
Mesh consisting of general polyhedral cells.
const labelListList & pointEdges() const
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
List< label > labelList
A List of labels.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< label > labelField
Specialisation of Field<T> for label.
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1, const label comm)
#define forAll(list, i)
Loop across all elements in list.