77 reset(facesToMove, weights, pointDisplacement);
80 forAll(facesToMove, faceToMoveI)
82 const label faceI(facesToMove[faceToMoveI]);
86 const face& fPoints(
mesh().faces()[faceI]);
88 const scalar area(
mag(
mesh().faceAreas()[faceI]));
92 const label pointI(fPoints[fPointI]);
94 pointDisplacement[pointI] +=
101 weights[pointI] += area;
107 forAll(facesToMove, faceToMoveI)
109 const label faceI(facesToMove[faceToMoveI]);
113 const face& fPoints(
mesh().faces()[faceI]);
117 const label pointI(fPoints[fPointI]);
119 if (weights[pointI] < SMALL)
125 const label cellI(pCells[pCellI]);
127 const scalar
volume(
mesh().cellVolumes()[cellI]);
129 pointDisplacement[pointI] +=
136 weights[pointI] +=
volume;
144 average(facesToMove, weights, pointDisplacement);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
Smooth ATC in cells having a point to a set of patches supplied by type.
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.
bool isInternalOrProcessorFace(const label faceI) const
Test if the given face is internal or on a processor boundary.
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.
equipotentialPointSmoother(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 displacements.
Mesh consisting of general polyhedral cells.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
const wordList volume
Standard volume field types (scalar, vector, tensor, etc).
List< label > labelList
A List of labels.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
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.