35 namespace pointSmoothers
41 laplacianPointSmoother,
78 reset(facesToMove, counts, pointDisplacement);
81 forAll(facesToMove, faceToMoveI)
83 const label faceI(facesToMove[faceToMoveI]);
87 const face& fPoints(
mesh().faces()[faceI]);
91 const label pointI(fPoints[fPointI]);
93 pointDisplacement[pointI] +=
103 forAll(facesToMove, faceToMoveI)
105 const label faceI(facesToMove[faceToMoveI]);
109 const face& fPoints(
mesh().faces()[faceI]);
113 const label pointI(fPoints[fPointI]);
115 if (counts[pointI] == 0)
121 const label cellI(pCells[pCellI]);
123 pointDisplacement[pointI] +=
135 average(facesToMove, counts, pointDisplacement);
const polyMesh & mesh() const
A face is a list of labels corresponding to mesh vertices.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
laplacianPointSmoother(const polyMesh &mesh, const dictionary &dict)
Construct from a dictionary and a polyMesh.
Abstract base class for point smoothing methods. Handles parallel communication via reset and average...
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(pointSmoother, equipotentialPointSmoother, dictionary)
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.
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)