Go to the documentation of this file.
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
420 const List<labelPair>& baffles,
421 const bool smoothMesh =
true,
422 const label nAllow = 0
429 const List<labelPair>& baffles,
431 const dictionary& meshQualityDict,
432 const bool smoothMesh =
true,
433 const label nAllow = 0
450 const polyMesh&
mesh,
451 const dictionary&
dict,
453 const bool dryRun =
false
462 const polyMesh&
mesh,
463 const dictionary&
dict,
466 const bool dryRun =
false
475 const polyMesh&
mesh,
476 const dictionary&
dict,
478 const List<labelPair>& baffles,
480 const bool dryRun =
false
489 const dictionary&
dict,
490 const polyMeshGeometry&,
494 const bool dryRun =
false
503 const dictionary&
dict,
504 const polyMeshGeometry&,
507 const List<labelPair>& baffles,
509 const bool dryRun =
false
519 const GeometricField<Type, pointPatchField, pointMesh>&
fld,
521 GeometricField<Type, pointPatchField, pointMesh>& newFld
528 const dictionary&
dict,
532 const Type& defaultValue =
Zero
List< label > labelList
A List of labels.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
scalar setErrorReduction(const scalar)
void modifyMotionPoints(pointField &newPoints) const
A class for handling words, derived from Foam::string.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void correctBoundaryConditions(pointVectorField &) const
A class for managing temporary objects.
ClassName("motionSmootherAlgo")
static constexpr const zero Zero
const indirectPrimitivePatch & patch() const
const labelList & adaptPatchIDs() const
tmp< pointField > curPoints() const
bool scaleMesh(labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces, const bool dryRun=false)
void setDisplacementPatchFields()
A HashTable with keys but without contents that is similar to std::unordered_set.
Mesh consisting of general polyhedral cells.
Generic templated field type.
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
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))
const pointVectorField & pointDisplacement() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh representing a set of points created from polyMesh.
const dictionary & paramDict() const
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const polyMesh & mesh() const
pointVectorField & pointDisplacement()
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
void smooth(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight, GeometricField< Type, pointPatchField, pointMesh > &newFld) const
const pointMesh & pMesh() const
Updateable mesh geometry and checking routines.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
Generic GeometricField class.
static Type get(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt, const Type &defaultValue=Zero)
labelList pointLabels(nPoints, -1)
static constexpr direction nComponents
A list of faces which address into the list of points.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...