Data Structures | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
motionSmootherAlgo Class Reference

Given a displacement moves the mesh by scaling the displacement back until there are no more mesh errors. More...

Inheritance diagram for motionSmootherAlgo:
Inheritance graph
[legend]
Collaboration diagram for motionSmootherAlgo:
Collaboration graph
[legend]

Data Structures

class  maxMagEqOp
 To synchronise displacements. We want max displacement since. More...
 

Public Member Functions

 ClassName ("motionSmootherAlgo")
 
 motionSmootherAlgo (polyMesh &, pointMesh &, indirectPrimitivePatch &pp, pointVectorField &displacement, pointScalarField &scale, pointField &oldPoints, const labelList &adaptPatchIDs, const dictionary &paramDict)
 Construct from mesh, patches to work on and smoothing parameters. More...
 
 ~motionSmootherAlgo ()
 Destructor. More...
 
const polyMeshmesh () const
 Reference to mesh. More...
 
const pointMeshpMesh () const
 Reference to pointMesh. More...
 
const indirectPrimitivePatchpatch () const
 Reference to patch. More...
 
const labelListadaptPatchIDs () const
 Patch labels that are being adapted. More...
 
const dictionaryparamDict () const
 
pointVectorFieldpointDisplacement ()
 Return reference to the point motion displacement field. More...
 
const pointVectorFieldpointDisplacement () const
 Return const reference to the point motion displacement field. More...
 
void correct ()
 Take over existing mesh position. More...
 
void setDisplacementPatchFields ()
 Set patch fields on displacement to be consistent with. More...
 
void setDisplacement (pointField &patchDisp)
 
void correctBoundaryConditions (pointVectorField &) const
 Special correctBoundaryConditions which evaluates fixedValue. More...
 
void modifyMotionPoints (pointField &newPoints) const
 Apply optional point constraint (2d correction) More...
 
tmp< pointFieldcurPoints () const
 Get the current points (oldPoints+scale*displacement) More...
 
scalar setErrorReduction (const scalar)
 Set the errorReduction (by how much to scale the displacement. More...
 
bool scaleMesh (labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
 Move mesh with given scale. Return true if mesh ok or has. More...
 
bool scaleMesh (labelList &checkFaces, const List< labelPair > &baffles, const bool smoothMesh=true, const label nAllow=0)
 Move mesh (with baffles) with given scale. More...
 
bool scaleMesh (labelList &checkFaces, const List< labelPair > &baffles, const dictionary &paramDict, const dictionary &meshQualityDict, const bool smoothMesh=true, const label nAllow=0)
 Move mesh with externally provided mesh constraints. More...
 
void movePoints ()
 Update for new mesh geometry. More...
 
void updateMesh ()
 Update for new mesh topology. More...
 
template<class Type >
void smooth (const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight, GeometricField< Type, pointPatchField, pointMesh > &newFld) const
 Fully explicit smoothing of fields (not positions) More...
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > avg (const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
 

Static Public Member Functions

static void setDisplacementPatchFields (const labelList &patchIDs, pointVectorField &pointDisplacement)
 Set patch fields on patchIDs to be consistent with. More...
 
static void setDisplacement (const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
 Set displacement field from displacement on patch points. More...
 
static bool checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
 Check mesh with mesh settings in dict. Collects incorrect faces. More...
 
static bool checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, const labelList &checkFaces, labelHashSet &wrongFaces)
 Check (subset of mesh) with mesh settings in dict. More...
 
static bool checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet &wrongFaces)
 Check (subset of mesh including baffles) with mesh settings. More...
 
static bool checkMesh (const bool report, const dictionary &dict, const polyMeshGeometry &, const pointField &, const labelList &checkFaces, labelHashSet &wrongFaces)
 Check part of mesh with mesh settings in dict. More...
 
static bool checkMesh (const bool report, const dictionary &dict, const polyMeshGeometry &, const pointField &, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet &wrongFaces)
 Check part of mesh including baffles with mesh settings in dict. More...
 

Private Member Functions

template<class Type >
tmp< GeometricField< Type, pointPatchField, pointMesh > > avg (const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
 Average of connected points. More...
 
template<class Type >
tmp< GeometricField< Type, pointPatchField, pointMesh > > avgPositions (const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
 Average postion of connected points. More...
 
template<class Type , class CombineOp >
void testSyncField (const Field< Type > &, const CombineOp &cop, const Type &zero, const scalar maxMag) const
 Test synchronisation of generic field (not positions!) on points. More...
 
void testSyncPositions (const pointField &, const scalar maxMag) const
 Test synchronisation of points. More...
 
labelHashSet getPoints (const labelHashSet &) const
 Get points used by given faces. More...
 
tmp< scalarFieldcalcEdgeWeights (const pointField &) const
 Calculate per-edge weight. More...
 
void minSmooth (const scalarField &edgeWeights, const PackedBoolList &isAffectedPoint, const pointScalarField &fld, pointScalarField &newFld) const
 Explicit smoothing and min on all affected internal points. More...
 
void minSmooth (const scalarField &edgeWeights, const PackedBoolList &isAffectedPoint, const labelList &meshPoints, const pointScalarField &fld, pointScalarField &newFld) const
 Same but only on selected points (usually patch points) More...
 
void scaleField (const labelHashSet &pointLabels, const scalar scale, pointScalarField &) const
 Scale certain (internal) points of a field. More...
 
void scaleField (const labelList &meshPoints, const labelHashSet &pointLabels, const scalar scale, pointScalarField &) const
 As above but points have to be in meshPoints as well. More...
 
void subtractField (const labelHashSet &pointLabels, const scalar f, pointScalarField &) const
 Lower on internal points. More...
 
void subtractField (const labelList &meshPoints, const labelHashSet &pointLabels, const scalar scale, pointScalarField &) const
 As above but points have to be in meshPoints as well. More...
 
bool isInternalPoint (const label pointI) const
 Helper function. Is point internal? More...
 
void getAffectedFacesAndPoints (const label nPointIter, const faceSet &wrongFaces, labelList &affectedFaces, PackedBoolList &isAffectedPoint) const
 Given a set of faces that cause smoothing and a number of. More...
 
 motionSmootherAlgo (const motionSmootherAlgo &)
 Disallow default bitwise copy construct. More...
 
void operator= (const motionSmootherAlgo &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

template<class Type >
static void checkConstraints (GeometricField< Type, pointPatchField, pointMesh > &)
 Check constraints. More...
 
static void checkFld (const pointScalarField &)
 

Private Attributes

polyMeshmesh_
 Reference to polyMesh. Non-const since we move mesh. More...
 
pointMeshpMesh_
 Reference to pointMesh. More...
 
indirectPrimitivePatchpp_
 Reference to face subset of all adaptPatchIDs. More...
 
pointVectorFielddisplacement_
 Displacement field. More...
 
pointScalarFieldscale_
 Scale factor for displacement. More...
 
pointFieldoldPoints_
 Starting mesh position. More...
 
const labelList adaptPatchIDs_
 Indices of fixedValue patches that we're allowed to modify the. More...
 
dictionary paramDict_
 
PackedBoolList isInternalPoint_
 Is mesh point on boundary or not. More...
 
PackedBoolList isMasterEdge_
 Is edge master (always except if on coupled boundary and on. More...
 

Detailed Description

Given a displacement moves the mesh by scaling the displacement back until there are no more mesh errors.

Holds displacement field (read upon construction since need boundary conditions) and scaling factor and optional patch number on which to scale back displacement.

E.g.

    // Construct iterative mesh mover.
    motionSmoother meshMover(mesh, labelList(1, patchI));

    // Set desired displacement:
    meshMover.displacement() = ..

    for (label iter = 0; iter < maxIter; iter++)
    {
        if (meshMover.scaleMesh(true))
        {
            Info<< "Successfully moved mesh" << endl;
            return true;
        }
    }
Note
  • Shared points (parallel): a processor can have points which are part of pp on another processor but have no pp itself (i.e. it has points and/or edges but no faces of pp). Hence we have to be careful when e.g. synchronising displacements that the value from the processor which has faces of pp get priority. This is currently handled in setDisplacement by resetting the internal displacement to zero on coupled points that are coupled to patch points before doing anything else. The combine operator used will give preference to non-zero values.
  • Various routines take baffles. These are sets of boundary faces that are treated as a single internal face. This is a hack used to apply movement to internal faces.
  • Mesh constraints are looked up from the supplied dictionary. (uses recursive lookup)
Source files

Definition at line 97 of file motionSmootherAlgo.H.

Constructor & Destructor Documentation

◆ motionSmootherAlgo() [1/2]

motionSmootherAlgo ( const motionSmootherAlgo )
private

Disallow default bitwise copy construct.

◆ motionSmootherAlgo() [2/2]

motionSmootherAlgo ( polyMesh mesh,
pointMesh pMesh,
indirectPrimitivePatch pp,
pointVectorField displacement,
pointScalarField scale,
pointField oldPoints,
const labelList adaptPatchIDs,
const dictionary paramDict 
)

Construct from mesh, patches to work on and smoothing parameters.

Definition at line 350 of file motionSmootherAlgo.C.

◆ ~motionSmootherAlgo()

Destructor.

Definition at line 377 of file motionSmootherAlgo.C.

Member Function Documentation

◆ avg() [1/2]

tmp<GeometricField<Type, pointPatchField, pointMesh> > avg ( const GeometricField< Type, pointPatchField, pointMesh > &  fld,
const scalarField edgeWeight 
) const
private

Average of connected points.

◆ avgPositions()

tmp<GeometricField<Type, pointPatchField, pointMesh> > avgPositions ( const GeometricField< Type, pointPatchField, pointMesh > &  fld,
const scalarField edgeWeight 
) const
private

Average postion of connected points.

◆ checkConstraints()

void checkConstraints ( GeometricField< Type, pointPatchField, pointMesh > &  pf)
staticprivate

Check constraints.

Definition at line 37 of file motionSmootherAlgoTemplates.C.

References Foam::abort(), GeometricField::boundaryField(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, forAllReverse, mesh, IOobject::name(), patchi, and PtrList::size().

Here is the call graph for this function:

◆ testSyncField()

void testSyncField ( const Field< Type > &  fld,
const CombineOp &  cop,
const Type &  zero,
const scalar  maxMag 
) const
private

Test synchronisation of generic field (not positions!) on points.

Definition at line 263 of file motionSmootherAlgoTemplates.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::mag(), and Foam::Pout.

Here is the call graph for this function:

◆ testSyncPositions()

void testSyncPositions ( const pointField fld,
const scalar  maxMag 
) const
private

Test synchronisation of points.

Definition at line 47 of file motionSmootherAlgo.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, and Foam::mag().

Here is the call graph for this function:

◆ checkFld()

void checkFld ( const pointScalarField fld)
staticprivate

Definition at line 75 of file motionSmootherAlgo.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, fld(), and forAll.

Here is the call graph for this function:

◆ getPoints()

Foam::labelHashSet getPoints ( const labelHashSet faceLabels) const
private

Get points used by given faces.

Definition at line 94 of file motionSmootherAlgo.C.

References f(), forAll, forAllConstIter(), and HashSet< Key, Hash >::insert().

Here is the call graph for this function:

◆ calcEdgeWeights()

Foam::tmp< Foam::scalarField > calcEdgeWeights ( const pointField points) const
private

Calculate per-edge weight.

Definition at line 115 of file motionSmootherAlgo.C.

References forAll, points, and List::size().

Here is the call graph for this function:

◆ minSmooth() [1/2]

void minSmooth ( const scalarField edgeWeights,
const PackedBoolList isAffectedPoint,
const pointScalarField fld,
pointScalarField newFld 
) const
private

Explicit smoothing and min on all affected internal points.

Definition at line 169 of file motionSmootherAlgo.C.

References pointConstraints::constrain(), fld(), forAll, PackedList::get(), Foam::min(), and MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New().

Here is the call graph for this function:

◆ minSmooth() [2/2]

void minSmooth ( const scalarField edgeWeights,
const PackedBoolList isAffectedPoint,
const labelList meshPoints,
const pointScalarField fld,
pointScalarField newFld 
) const
private

Same but only on selected points (usually patch points)

Definition at line 134 of file motionSmootherAlgo.C.

References pointConstraints::constrain(), fld(), forAll, PackedList::get(), Foam::min(), and MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New().

Here is the call graph for this function:

◆ scaleField() [1/2]

void scaleField ( const labelHashSet pointLabels,
const scalar  scale,
pointScalarField fld 
) const
private

Scale certain (internal) points of a field.

Definition at line 203 of file motionSmootherAlgo.C.

References pointConstraints::constrain(), fld(), forAllConstIter(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), and pointLabels().

Here is the call graph for this function:

◆ scaleField() [2/2]

void scaleField ( const labelList meshPoints,
const labelHashSet pointLabels,
const scalar  scale,
pointScalarField fld 
) const
private

As above but points have to be in meshPoints as well.

(usually to scale patch points)

Definition at line 224 of file motionSmootherAlgo.C.

References fld(), forAll, and pointLabels().

Here is the call graph for this function:

◆ subtractField() [1/2]

void subtractField ( const labelHashSet pointLabels,
const scalar  f,
pointScalarField fld 
) const
private

Lower on internal points.

Definition at line 245 of file motionSmootherAlgo.C.

References pointConstraints::constrain(), f(), fld(), forAllConstIter(), Foam::max(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), and pointLabels().

Here is the call graph for this function:

◆ subtractField() [2/2]

void subtractField ( const labelList meshPoints,
const labelHashSet pointLabels,
const scalar  scale,
pointScalarField fld 
) const
private

As above but points have to be in meshPoints as well.

(usually to scale patch points)

Definition at line 266 of file motionSmootherAlgo.C.

References f(), fld(), forAll, Foam::max(), and pointLabels().

Here is the call graph for this function:

◆ isInternalPoint()

bool isInternalPoint ( const label  pointI) const
private

Helper function. Is point internal?

Definition at line 285 of file motionSmootherAlgo.C.

◆ getAffectedFacesAndPoints()

void getAffectedFacesAndPoints ( const label  nPointIter,
const faceSet wrongFaces,
labelList affectedFaces,
PackedBoolList isAffectedPoint 
) const
private

Given a set of faces that cause smoothing and a number of.

iterations determine the maximum set of points who are affected and the accordingly affected faces.

Definition at line 292 of file motionSmootherAlgo.C.

References f(), forAll, forAllConstIter(), HashSet< Key, Hash >::insert(), PackedBoolList::set(), PackedList::setSize(), faceSet::sync(), and HashTable::toc().

Here is the call graph for this function:

◆ operator=()

void operator= ( const motionSmootherAlgo )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "motionSmootherAlgo"  )

◆ mesh()

const Foam::polyMesh & mesh ( ) const

Reference to mesh.

Definition at line 383 of file motionSmootherAlgo.C.

Referenced by autoSnapDriver::smoothInternalDisplacement(), and autoSnapDriver::smoothPatchDisplacement().

Here is the caller graph for this function:

◆ pMesh()

const Foam::pointMesh & pMesh ( ) const

Reference to pointMesh.

Definition at line 389 of file motionSmootherAlgo.C.

Referenced by autoSnapDriver::smoothDisplacement().

Here is the caller graph for this function:

◆ patch()

const Foam::indirectPrimitivePatch & patch ( ) const

◆ adaptPatchIDs()

const Foam::labelList & adaptPatchIDs ( ) const

Patch labels that are being adapted.

Definition at line 401 of file motionSmootherAlgo.C.

◆ paramDict()

const Foam::dictionary & paramDict ( ) const

Definition at line 407 of file motionSmootherAlgo.C.

◆ pointDisplacement() [1/2]

pointVectorField& pointDisplacement ( )
inline

Return reference to the point motion displacement field.

Definition at line 336 of file motionSmootherAlgo.H.

References motionSmootherAlgo::displacement_.

Referenced by autoSnapDriver::preSmoothPatch().

Here is the caller graph for this function:

◆ pointDisplacement() [2/2]

const pointVectorField& pointDisplacement ( ) const
inline

Return const reference to the point motion displacement field.

Definition at line 342 of file motionSmootherAlgo.H.

References motionSmootherAlgo::displacement_.

◆ correct()

void correct ( )

Take over existing mesh position.

Definition at line 413 of file motionSmootherAlgo.C.

Referenced by autoSnapDriver::doSnap(), and autoSnapDriver::preSmoothPatch().

Here is the caller graph for this function:

◆ setDisplacementPatchFields() [1/2]

void setDisplacementPatchFields ( const labelList patchIDs,
pointVectorField pointDisplacement 
)
static

Set patch fields on patchIDs to be consistent with.

all other boundary conditions

Definition at line 426 of file motionSmootherAlgo.C.

References GeometricField::boundaryField(), pointConstraints::constrainCorners(), GeometricField::GeometricBoundaryField::evaluate(), forAll, HashTable::found(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), and UPstream::scheduled.

Here is the call graph for this function:

◆ setDisplacementPatchFields() [2/2]

void setDisplacementPatchFields ( )

Set patch fields on displacement to be consistent with.

internal values.

Definition at line 485 of file motionSmootherAlgo.C.

◆ setDisplacement() [1/2]

void setDisplacement ( const labelList patchIDs,
const indirectPrimitivePatch pp,
pointField patchDisp,
pointVectorField displacement 
)
static

Set displacement field from displacement on patch points.

Modify provided displacement to be consistent with actual boundary conditions on displacement. Note: resets the displacement to be 0 on coupled patches beforehand to make sure shared points partially on pp (on some processors) and partially not (on other processors) get the value from pp.

Definition at line 492 of file motionSmootherAlgo.C.

References globalMeshData::coupledPatch(), IOobject::db(), Foam::endl(), forAll, polyMesh::globalData(), Foam::mag(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), OFstream::name(), primitiveMesh::nPoints(), IOobject::path(), polyMesh::points(), Foam::Pout, PackedBoolList::set(), syncTools::syncPointList(), Foam::meshTools::writeOBJ(), and Vector< scalar >::zero.

Referenced by autoLayerDriver::addLayers(), autoSnapDriver::doSnap(), and autoSnapDriver::preSmoothPatch().

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

◆ setDisplacement() [2/2]

void setDisplacement ( pointField patchDisp)

Definition at line 587 of file motionSmootherAlgo.C.

◆ correctBoundaryConditions()

void correctBoundaryConditions ( pointVectorField displacement) const

Special correctBoundaryConditions which evaluates fixedValue.

patches first so they get overwritten with any constraint bc's.

Definition at line 595 of file motionSmootherAlgo.C.

References UPstream::blocking, GeometricField::boundaryField(), pointConstraints::constrainCorners(), GeometricField::GeometricBoundaryField::evaluate(), forAll, HashTable::found(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), syncTools::syncPointList(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ modifyMotionPoints()

void modifyMotionPoints ( pointField newPoints) const

◆ curPoints()

Foam::tmp< Foam::pointField > curPoints ( ) const

◆ setErrorReduction()

Foam::scalar setErrorReduction ( const scalar  errorReduction)

Set the errorReduction (by how much to scale the displacement.

at error locations) parameter. Returns the old value. Set to 0 (so revert to old mesh) grows out one cell layer from error faces.

Definition at line 719 of file motionSmootherAlgo.C.

References Foam::readScalar().

Referenced by autoSnapDriver::preSmoothPatch(), and autoSnapDriver::scaleMesh().

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

◆ scaleMesh() [1/3]

bool scaleMesh ( labelList checkFaces,
const bool  smoothMesh = true,
const label  nAllow = 0 
)

Move mesh with given scale. Return true if mesh ok or has.

less than nAllow errors, false otherwise and locally update scale. Smoothmesh=false means only patch points get moved. Parallel ok (as long as displacement field is consistent across patches)

Definition at line 733 of file motionSmootherAlgo.C.

Referenced by autoSnapDriver::preSmoothPatch(), and autoSnapDriver::scaleMesh().

Here is the caller graph for this function:

◆ scaleMesh() [2/3]

bool scaleMesh ( labelList checkFaces,
const List< labelPair > &  baffles,
const bool  smoothMesh = true,
const label  nAllow = 0 
)

Move mesh (with baffles) with given scale.

Definition at line 751 of file motionSmootherAlgo.C.

◆ scaleMesh() [3/3]

bool scaleMesh ( labelList checkFaces,
const List< labelPair > &  baffles,
const dictionary paramDict,
const dictionary meshQualityDict,
const bool  smoothMesh = true,
const label  nAllow = 0 
)

◆ movePoints()

void movePoints ( )

Update for new mesh geometry.

Definition at line 709 of file motionSmootherAlgo.C.

◆ updateMesh()

void updateMesh ( )

Update for new mesh topology.

Definition at line 1049 of file motionSmootherAlgo.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, syncTools::getMasterEdges(), Foam::nl, and patches.

Here is the call graph for this function:

◆ checkMesh() [1/5]

bool checkMesh ( const bool  report,
const polyMesh mesh,
const dictionary dict,
labelHashSet wrongFaces 
)
static

Check mesh with mesh settings in dict. Collects incorrect faces.

in set. Returns true if one or more faces in error. Parallel ok.

Definition at line 415 of file motionSmootherAlgoCheck.C.

References Foam::polyMeshGenChecks::checkMesh(), dict, Foam::identity(), and mesh.

Referenced by autoLayerDriver::checkAndUnmark(), badQualityToCell::combine(), badQualityToFace::combine(), autoLayerDriver::doLayers(), autoSnapDriver::doSnap(), main(), and meshRefinement::splitFacesUndo().

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

◆ checkMesh() [2/5]

bool checkMesh ( const bool  report,
const polyMesh mesh,
const dictionary dict,
const labelList checkFaces,
labelHashSet wrongFaces 
)
static

Check (subset of mesh) with mesh settings in dict.

Collects incorrect faces in set. Returns true if one or more faces in error. Parallel ok.

Definition at line 33 of file motionSmootherAlgoCheck.C.

References Foam::polyMeshGenChecks::checkMesh(), dict, and mesh.

Here is the call graph for this function:

◆ checkMesh() [3/5]

bool checkMesh ( const bool  report,
const polyMesh mesh,
const dictionary dict,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet wrongFaces 
)
static

Check (subset of mesh including baffles) with mesh settings.

in dict. Collects incorrect faces in set. Returns true if one or more faces in error. Parallel ok.

Definition at line 54 of file motionSmootherAlgoCheck.C.

References Foam::polyMeshGenChecks::checkFaceAngles(), Foam::polyMeshGenChecks::checkFaceDotProduct(), Foam::polyMeshGenChecks::checkFaceFlatness(), Foam::polyMeshGenChecks::checkFacePyramids(), Foam::polyMeshGenChecks::checkFaceSkewness(), dict, Foam::endl(), Foam::Info, mesh, readScalar, Foam::returnReduce(), Foam::setw(), and HashTable::size().

Here is the call graph for this function:

◆ checkMesh() [4/5]

bool checkMesh ( const bool  report,
const dictionary dict,
const polyMeshGeometry meshGeom,
const pointField points,
const labelList checkFaces,
labelHashSet wrongFaces 
)
static

Check part of mesh with mesh settings in dict.

Collects incorrect faces in set. Returns true if one or more faces in error. Parallel ok.

Definition at line 433 of file motionSmootherAlgoCheck.C.

References Foam::polyMeshGenChecks::checkMesh(), dict, and points.

Here is the call graph for this function:

◆ checkMesh() [5/5]

bool checkMesh ( const bool  report,
const dictionary dict,
const polyMeshGeometry meshGeom,
const pointField points,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet wrongFaces 
)
static

◆ smooth()

void smooth ( const GeometricField< Type, pointPatchField, pointMesh > &  fld,
const scalarField edgeWeight,
GeometricField< Type, pointPatchField, pointMesh > &  newFld 
) const

Fully explicit smoothing of fields (not positions)

of internal points with varying diffusivity.

Definition at line 238 of file motionSmootherAlgoTemplates.C.

References fld(), forAll, and Foam::compressible::New().

Referenced by autoSnapDriver::smoothDisplacement().

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

◆ avg() [2/2]

Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > avg ( const GeometricField< Type, pointPatchField, pointMesh > &  fld,
const scalarField edgeWeight 
) const

Definition at line 140 of file motionSmootherAlgoTemplates.C.

References Foam::constant::electromagnetic::e, fld(), forAll, Foam::mag(), mesh, Foam::compressible::New(), and w().

Here is the call graph for this function:

Field Documentation

◆ mesh_

polyMesh& mesh_
private

Reference to polyMesh. Non-const since we move mesh.

Definition at line 135 of file motionSmootherAlgo.H.

◆ pMesh_

pointMesh& pMesh_
private

Reference to pointMesh.

Definition at line 138 of file motionSmootherAlgo.H.

◆ pp_

indirectPrimitivePatch& pp_
private

Reference to face subset of all adaptPatchIDs.

Definition at line 141 of file motionSmootherAlgo.H.

◆ displacement_

pointVectorField& displacement_
private

Displacement field.

Definition at line 144 of file motionSmootherAlgo.H.

Referenced by motionSmootherAlgo::pointDisplacement().

◆ scale_

pointScalarField& scale_
private

Scale factor for displacement.

Definition at line 147 of file motionSmootherAlgo.H.

◆ oldPoints_

pointField& oldPoints_
private

Starting mesh position.

Definition at line 150 of file motionSmootherAlgo.H.

◆ adaptPatchIDs_

const labelList adaptPatchIDs_
private

Indices of fixedValue patches that we're allowed to modify the.

displacement on.

Definition at line 157 of file motionSmootherAlgo.H.

◆ paramDict_

dictionary paramDict_
private

Definition at line 160 of file motionSmootherAlgo.H.

◆ isInternalPoint_

PackedBoolList isInternalPoint_
private

Is mesh point on boundary or not.

Definition at line 163 of file motionSmootherAlgo.H.

◆ isMasterEdge_

PackedBoolList isMasterEdge_
private

Is edge master (always except if on coupled boundary and on.

lower processor)

Definition at line 167 of file motionSmootherAlgo.H.


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