pointSmoother Class Referenceabstract

Abstract base class for point smoothing methods. Handles parallel communication via reset and average functions. More...

Inheritance diagram for pointSmoother:

Public Member Functions

 TypeName ("pointSmoother")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, pointSmoother, dictionary,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
 
 pointSmoother (const polyMesh &mesh, const dictionary &)
 Construct from a dictionary and a point displacement field. More...
 
virtual ~pointSmoother ()
 Destructor. More...
 
const polyMeshmesh () const
 
void update (const labelList &facesToMove, const pointField &oldPoints, const pointField &currentPoints, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes, pointVectorField &pointDisplacement, const bool correctBCs=true) const
 Update the point displacements and apply constraints. More...
 
void update (const labelList &facesToMove, const pointField &oldPoints, const pointField &currentPoints, const polyMeshGeometry &meshGeometry, pointVectorField &pointDisplacement, const bool correctBCs=true) const
 Update the point displacements and apply constraints. More...
 
virtual void calculate (const labelList &facesToMove, const pointField &oldPoints, const pointField &currentPoints, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes, vectorField &pointDisplacement) const =0
 Calculate the point displacement. More...
 
virtual void calculate (const labelList &facesToMove, const pointField &oldPoints, const pointField &currentPoints, const polyMeshGeometry &meshGeometry, vectorField &pointDisplacement) const
 Update the point displacements. More...
 
virtual tmp< scalarFieldfaceQuality (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, point locations supplied. Move to motionSolver level? More...
 
virtual tmp< scalarFieldcellQuality (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. Move to motionSolver level? More...
 

Static Public Member Functions

static autoPtr< pointSmootherNew (const word &pointSmootherType, const polyMesh &mesh, const dictionary &dict)
 Construct given type. More...
 
static autoPtr< pointSmootherNew (const polyMesh &mesh, const dictionary &dict)
 Construct with type looked up from dictionary. More...
 

Protected Member Functions

bool isInternalOrProcessorFace (const label faceI) const
 Test if the given face is internal or on a processor boundary. More...
 
autoPtr< PackedBoolListpointsToMove (const labelList &facesToMove, const bool moveInternalFaces) const
 Get a boolean list of the points to be moved. More...
 
template<class weightType >
void reset (const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement, const bool resetInternalFaces=true) const
 Reset the relevant weights and displacements to zero. More...
 
template<class weightType >
void average (const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement) const
 Average the displacements using the weights provided. More...
 

Detailed Description

Abstract base class for point smoothing methods. Handles parallel communication via reset and average functions.

Source files

Definition at line 50 of file pointSmoother.H.

Constructor & Destructor Documentation

◆ pointSmoother()

pointSmoother ( const polyMesh mesh,
const dictionary dict 
)

Construct from a dictionary and a point displacement field.

Definition at line 106 of file pointSmoother.C.

References polyMesh::boundaryMesh(), mesh, and pp().

Here is the call graph for this function:

◆ ~pointSmoother()

~pointSmoother ( )
virtual

Destructor.

Definition at line 166 of file pointSmoother.C.

Member Function Documentation

◆ isInternalOrProcessorFace()

bool isInternalOrProcessorFace ( const label  faceI) const
protected

Test if the given face is internal or on a processor boundary.

Definition at line 36 of file pointSmoother.C.

References pointSmoother::mesh(), and patchID.

Here is the call graph for this function:

◆ pointsToMove()

Foam::autoPtr< Foam::PackedBoolList > pointsToMove ( const labelList facesToMove,
const bool  moveInternalFaces 
) const
protected

Get a boolean list of the points to be moved.

Definition at line 62 of file pointSmoother.C.

References forAll, mesh, nPoints, syncTools::syncPointList(), and U.

Here is the call graph for this function:

◆ reset()

void reset ( const labelList facesToMove,
Field< weightType > &  weights,
vectorField pointDisplacement,
const bool  resetInternalFaces = true 
) const
protected

Reset the relevant weights and displacements to zero.

Definition at line 28 of file pointSmootherTemplates.C.

References forAll.

◆ average()

void average ( const labelList facesToMove,
Field< weightType > &  weights,
vectorField pointDisplacement 
) const
protected

Average the displacements using the weights provided.

Definition at line 55 of file pointSmootherTemplates.C.

References forAll, and mesh.

◆ TypeName()

TypeName ( "pointSmoother"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
pointSmoother  ,
dictionary  ,
(const polyMesh &mesh, const dictionary &dict ,
(mesh, dict  
)

◆ New() [1/2]

Foam::autoPtr< Foam::pointSmoother > New ( const word pointSmootherType,
const polyMesh mesh,
const dictionary dict 
)
static

Construct given type.

Definition at line 127 of file pointSmoother.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, and mesh.

Here is the call graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::pointSmoother > New ( const polyMesh mesh,
const dictionary dict 
)
static

Construct with type looked up from dictionary.

Definition at line 153 of file pointSmoother.C.

References dict, dictionary::lookup(), mesh, and Foam::New().

Here is the call graph for this function:

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 180 of file pointSmoother.H.

Referenced by pointSmoother::isInternalOrProcessorFace().

Here is the caller graph for this function:

◆ update() [1/2]

void update ( const labelList facesToMove,
const pointField oldPoints,
const pointField currentPoints,
const pointField faceCentres,
const vectorField faceAreas,
const pointField cellCentres,
const scalarField cellVolumes,
pointVectorField pointDisplacement,
const bool  correctBCs = true 
) const

Update the point displacements and apply constraints.

Definition at line 173 of file pointSmoother.C.

References pointConstraints::constrainDisplacement(), mesh, MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), and GeometricField< Type, PatchField, GeoMesh >::ref().

Referenced by pointSmoother::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update() [2/2]

void update ( const labelList facesToMove,
const pointField oldPoints,
const pointField currentPoints,
const polyMeshGeometry meshGeometry,
pointVectorField pointDisplacement,
const bool  correctBCs = true 
) const
inline

Update the point displacements and apply constraints.

Definition at line 205 of file pointSmoother.H.

References polyMeshGeometry::cellCentres(), polyMeshGeometry::cellVolumes(), polyMeshGeometry::faceAreas(), polyMeshGeometry::faceCentres(), and pointSmoother::update().

Here is the call graph for this function:

◆ calculate() [1/2]

virtual void calculate ( const labelList facesToMove,
const pointField oldPoints,
const pointField currentPoints,
const pointField faceCentres,
const vectorField faceAreas,
const pointField cellCentres,
const scalarField cellVolumes,
vectorField pointDisplacement 
) const
pure virtual

Calculate the point displacement.

Implemented in geometricElementTransformPointSmoother, equipotentialPointSmoother, laplacianConstraintPointSmoother, and laplacianPointSmoother.

Referenced by pointSmoother::calculate().

Here is the caller graph for this function:

◆ calculate() [2/2]

virtual void calculate ( const labelList facesToMove,
const pointField oldPoints,
const pointField currentPoints,
const polyMeshGeometry meshGeometry,
vectorField pointDisplacement 
) const
inlinevirtual

Update the point displacements.

Definition at line 247 of file pointSmoother.H.

References pointSmoother::calculate(), polyMeshGeometry::cellCentres(), polyMeshGeometry::cellVolumes(), polyMeshGeometry::faceAreas(), and polyMeshGeometry::faceCentres().

Here is the call graph for this function:

◆ faceQuality()

Foam::tmp< Foam::scalarField > faceQuality ( const pointField points,
const pointField faceCentres,
const vectorField faceAreas,
const pointField cellCentres,
const scalarField cellVolumes 
) const
virtual

Check element quality: 1 = best, 0 = invalid. (also negative?) Topology from mesh, point locations supplied. Move to motionSolver level?

Definition at line 218 of file pointSmoother.C.

References polyMeshTools::faceOrthogonality(), and mesh.

Here is the call graph for this function:

◆ cellQuality()

Foam::tmp< Foam::scalarField > cellQuality ( const pointField points,
const pointField faceCentres,
const vectorField faceAreas,
const pointField cellCentres,
const scalarField cellVolumes 
) const
virtual

Check element quality: 1 = best, 0 = invalid. Topology from mesh, point locations supplied. Move to motionSolver level?

Definition at line 249 of file pointSmoother.C.

References polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, mesh, Foam::min(), primitiveMesh::nInternalFaces(), points, and tmp< T >::ref().

Here is the call graph for this function:

The documentation for this class was generated from the following files: