80#ifndef motionSmootherAlgo_H
81#define motionSmootherAlgo_H
94class polyMeshGeometry;
116 scalar magX =
mag(
x[i]);
117 scalar magY =
mag(
y[i]);
123 else if (magX == magY)
196 static void checkConstraints
202 template<
class Type,
class CombineOp>
206 const CombineOp& cop,
212 void testSyncPositions(
const pointField&,
const scalar maxMag)
const;
226 const bitSet& isAffectedPoint,
235 const bitSet& isAffectedPoint,
280 void getAffectedFacesAndPoints
282 const label nPointIter,
313 const bool dryRun =
false
342 return displacement_;
348 return displacement_;
412 const bool smoothMesh =
true,
413 const label nAllow = 0
421 const bool smoothMesh =
true,
422 const label nAllow = 0
432 const bool smoothMesh =
true,
433 const label nAllow = 0
453 const bool dryRun =
false
466 const bool dryRun =
false
480 const bool dryRun =
false
494 const bool dryRun =
false
509 const bool dryRun =
false
532 const Type& defaultValue =
Zero
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A list of faces which address into the list of points.
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,...
option
Enumeration for the data type and search/match modes (bitmask)
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
~motionSmootherAlgo()
Destructor.
void setDisplacementPatchFields()
Set patch fields on displacement to be consistent with.
tmp< pointField > curPoints() const
Get the current points (oldPoints+scale*displacement)
scalar setErrorReduction(const scalar)
Set the errorReduction (by how much to scale the displacement.
const labelList & adaptPatchIDs() const
Patch labels that are being adapted.
ClassName("motionSmootherAlgo")
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
Set displacement field from displacement on patch points.
static Type get(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt, const Type &defaultValue=Zero)
Wrapper around dictionary::get which does not exit.
void correct()
Take over existing mesh position.
const polyMesh & mesh() const
Reference to mesh.
void movePoints()
Update for new mesh geometry.
const indirectPrimitivePatch & patch() const
Reference to patch.
void smooth(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight, GeometricField< Type, pointPatchField, pointMesh > &newFld) const
Fully explicit smoothing of fields (not positions)
const pointMesh & pMesh() const
Reference to pointMesh.
const pointVectorField & pointDisplacement() const
Return const reference to the point motion displacement field.
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces, const bool dryRun=false)
Check mesh with mesh settings in dict. Collects incorrect faces.
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
const dictionary & paramDict() const
bool scaleMesh(labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
Move mesh with given scale. Return true if mesh ok or has.
void updateMesh()
Update for new mesh topology.
void modifyMotionPoints(pointField &newPoints) const
Apply optional point constraint (2d correction)
static constexpr direction nComponents
Number of components in bool is 1.
Mesh representing a set of points created from polyMesh.
Updateable mesh geometry and checking routines.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
labelList pointLabels(nPoints, -1)
cellMask correctBoundaryConditions()