80 #ifndef motionSmootherAlgo_H 81 #define motionSmootherAlgo_H 94 class 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 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.
const labelList patchIDs(pbm.indices(polyPatchNames, true))
const polyMesh & mesh() const
Reference to mesh.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
labelList pointLabels(nPoints, -1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
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
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
void movePoints()
Update for new mesh geometry.
labelList faceLabels(nFaceLabels)
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.
scalar setErrorReduction(const scalar)
Set the errorReduction (by how much to scale the displacement.
void setDisplacementPatchFields()
Set patch fields on displacement to be consistent with.
A class for handling words, derived from Foam::string.
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
Set displacement field from displacement on patch points.
Updateable mesh geometry and checking routines.
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)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const indirectPrimitivePatch & patch() const
Reference to patch.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
tmp< pointField > curPoints() const
Get the current points (oldPoints+scale*displacement)
ClassName("motionSmootherAlgo")
Macro definitions for declaring ClassName(), NamespaceName(), etc.
option
Enumeration for the data type and search/match modes (bitmask)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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...
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
~motionSmootherAlgo()
Destructor.
static constexpr const zero Zero
Global zero (0)