39#ifndef Foam_pointSmoother_H
40#define Foam_pointSmoother_H
71 pointSmoother(
const pointSmoother&) =
delete;
74 void operator=(
const pointSmoother&) =
delete;
88 const bool moveInternalFaces
92 template <
class weightType>
98 const bool resetInternalFaces =
true
102 template <
class weightType>
139 const word& pointSmootherType,
175 const bool correctBCs =
true
186 const bool correctBCs =
true
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
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,...
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 =0
Calculate the point displacement.
declareRunTimeSelectionTable(autoPtr, pointSmoother, dictionary,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
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.
static autoPtr< pointSmoother > New(const word &pointSmootherType, const polyMesh &mesh, const dictionary &dict)
Construct given type.
bitSet pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get list of the points to be moved.
virtual ~pointSmoother()=default
Destructor.
void average(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement) const
Average the displacements using the weights provided.
virtual tmp< scalarField > cellQuality(const pointField &points, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes) const
Check element quality: 1 = best, 0 = invalid. Topology from mesh, point locations supplied....
void update(const labelList &facesToMove, const pointField &oldPoints, const pointField ¤tPoints, const polyMeshGeometry &meshGeometry, pointVectorField &pointDisplacement, const bool correctBCs=true) const
Update the point displacements and apply constraints.
const polyMesh & mesh() const noexcept
Access the mesh.
virtual tmp< scalarField > faceQuality(const pointField &points, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes) const
Check element quality: 1 = best, 0 = invalid. (also negative?) Topology from mesh,...
TypeName("pointSmoother")
Runtime type information.
virtual void calculate(const labelList &facesToMove, const pointField &oldPoints, const pointField ¤tPoints, const polyMeshGeometry &meshGeometry, vectorField &pointDisplacement) const
Update the point displacements.
Updateable mesh geometry and checking routines.
const scalarField & cellVolumes() const
const vectorField & faceAreas() const
const vectorField & faceCentres() const
const vectorField & cellCentres() const
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vectorField pointField
pointField is a vectorField.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.