76 #ifndef motionSmootherAlgo_H 77 #define motionSmootherAlgo_H 112 scalar magX =
mag(x[i]);
113 scalar magY =
mag(y[i]);
119 else if (magX == magY)
189 static void checkConstraints
195 template<
class Type,
class CombineOp>
199 const CombineOp& cop,
205 void testSyncPositions(
const pointField&,
const scalar maxMag)
const;
271 bool isInternalPoint(
const label pointi)
const;
276 void getAffectedFacesAndPoints
278 const label nPointIter,
394 const bool smoothMesh =
true,
395 const label nAllow = 0
403 const bool smoothMesh =
true,
404 const label nAllow = 0
414 const bool smoothMesh =
true,
415 const label nAllow = 0
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const polyMesh & mesh() const
Reference to mesh.
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.
void operator=(const motionSmootherAlgo &)=delete
Disallow default bitwise assignment.
labelList pointLabels(nPoints, -1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
Set displacement field from displacement on patch points.
void correctBoundaryConditions(pointVectorField &) const
Special correctBoundaryConditions which evaluates fixedValue.
bool scaleMesh(labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
Move mesh with given scale. Return true if mesh ok or has.
const pointMesh & pMesh() const
Reference to pointMesh.
const dictionary & paramDict() const
Generic GeometricField class.
void movePoints()
Update for new mesh geometry.
Mesh representing a set of points created from polyMesh.
void correct()
Take over existing mesh position.
A list of faces which address into the list of points.
static const direction nComponents
Number of components in this vector space.
scalar setErrorReduction(const scalar)
Set the errorReduction (by how much to scale the displacement.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void setDisplacementPatchFields()
Set patch fields on displacement to be consistent with.
void modifyMotionPoints(pointField &newPoints) const
Apply optional point constraint (2d correction)
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 indirectPrimitivePatch & patch() const
Reference to patch.
tmp< pointField > curPoints() const
Get the current points (oldPoints+scale*displacement)
ClassName("motionSmootherAlgo")
Macro definitions for declaring ClassName(), NamespaceName(), etc.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
dimensioned< scalar > mag(const dimensioned< Type > &)
void updateMesh()
Update for new mesh topology.
Mesh consisting of general polyhedral cells.
const labelList & adaptPatchIDs() const
Patch labels that are being adapted.
A class for managing temporary objects.
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
~motionSmootherAlgo()
Destructor.