Given a displacement moves the mesh by scaling the displacement back until there are no more mesh errors. More...
Public Member Functions | |
ClassName ("motionSmoother") | |
motionSmoother (polyMesh &, pointMesh &, indirectPrimitivePatch &pp, const labelList &adaptPatchIDs, const dictionary ¶mDict) | |
Construct from mesh, patches to work on and smoothing parameters. More... | |
motionSmoother (polyMesh &, indirectPrimitivePatch &pp, const labelList &adaptPatchIDs, const pointVectorField &, const dictionary ¶mDict) | |
Construct from mesh, patches to work on and smoothing parameters and. More... | |
Public Member Functions inherited from motionSmootherData | |
motionSmootherData (const pointMesh &) | |
Construct read. More... | |
motionSmootherData (const pointVectorField &) | |
Construct from pointDisplacement. More... | |
pointVectorField & | displacement () |
Reference to displacement field. More... | |
const pointVectorField & | displacement () const |
Reference to displacement field. More... | |
const pointScalarField & | scale () const |
Reference to scale field. More... | |
const pointField & | oldPoints () const |
Starting mesh position. More... | |
Public Member Functions inherited from motionSmootherAlgo | |
ClassName ("motionSmootherAlgo") | |
motionSmootherAlgo (polyMesh &, pointMesh &, indirectPrimitivePatch &pp, pointVectorField &displacement, pointScalarField &scale, pointField &oldPoints, const labelList &adaptPatchIDs, const dictionary ¶mDict) | |
Construct from mesh, patches to work on and smoothing parameters. More... | |
motionSmootherAlgo (const motionSmootherAlgo &)=delete | |
Disallow default bitwise copy construction. More... | |
~motionSmootherAlgo () | |
Destructor. More... | |
const polyMesh & | mesh () const |
Reference to mesh. More... | |
const pointMesh & | pMesh () const |
Reference to pointMesh. More... | |
const indirectPrimitivePatch & | patch () const |
Reference to patch. More... | |
const labelList & | adaptPatchIDs () const |
Patch labels that are being adapted. More... | |
const dictionary & | paramDict () const |
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< pointField > | curPoints () 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 ¶mDict, 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... | |
void | operator= (const motionSmootherAlgo &)=delete |
Disallow default bitwise assignment. More... | |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > | avg (const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const |
Additional Inherited Members | |
Static Public Member Functions inherited from motionSmootherAlgo | |
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... | |
Protected Attributes inherited from motionSmootherData | |
pointVectorField | displacement_ |
Displacement field. More... | |
pointScalarField | scale_ |
Scale factor for displacement. More... | |
pointField | oldPoints_ |
Starting mesh position. More... | |
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; } }
Definition at line 89 of file motionSmoother.H.
motionSmoother | ( | polyMesh & | mesh, |
pointMesh & | pMesh, | ||
indirectPrimitivePatch & | pp, | ||
const labelList & | adaptPatchIDs, | ||
const dictionary & | paramDict | ||
) |
Construct from mesh, patches to work on and smoothing parameters.
Reads displacement field (only boundary conditions used)
Definition at line 39 of file motionSmoother.C.
motionSmoother | ( | polyMesh & | mesh, |
indirectPrimitivePatch & | pp, | ||
const labelList & | adaptPatchIDs, | ||
const pointVectorField & | displacement, | ||
const dictionary & | paramDict | ||
) |
Construct from mesh, patches to work on and smoothing parameters and.
displacementfield (only boundary conditions used)
Definition at line 63 of file motionSmoother.C.
ClassName | ( | "motionSmoother" | ) |