34 namespace pointSmoothers
77 reset(facesToMove, weights, pointDisplacement);
80 forAll(facesToMove, faceToMoveI)
82 const label faceI(facesToMove[faceToMoveI]);
86 const face& fPoints(
mesh().faces()[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);
const polyMesh & mesh() const
A face is a list of labels corresponding to mesh vertices.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for point smoothing methods. Handles parallel communication via reset and average...
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.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(pointSmoother, equipotentialPointSmoother, dictionary)
const wordList area
Standard area field types (scalar, vector, tensor, etc)
const wordList volume
Standard volume field types (scalar, vector, tensor, etc)
equipotentialPointSmoother(const polyMesh &mesh, const dictionary &dict)
Construct from a dictionary and a polyMesh.
bool isInternalOrProcessorFace(const label faceI) const
Test if the given face is internal or on a processor boundary.
void reset(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement, const bool resetInternalFaces=true) const
Reset the relevant weights and displacements to zero.
Mesh consisting of general polyhedral cells.
void average(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement) const
Average the displacements using the weights provided.
List< label > labelList
A List of labels.
defineTypeNameAndDebug(equipotentialPointSmoother, 0)