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 const direction nComponents
Number of components in this vector space.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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.
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.
tmp< pointField > curPoints() const
Get the current points (oldPoints+scale*displacement)
void topoChange()
Update for new mesh topology.
scalar setErrorReduction(const scalar)
Set the errorReduction (by how much to scale the displacement.
ClassName("motionSmootherAlgo")
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
Set displacement field from displacement on patch points.
void correct()
Take over existing mesh position.
const polyMesh & mesh() const
Reference to mesh.
void smooth(const PointField< Type > &fld, const scalarField &edgeWeight, PointField< Type > &newFld) const
Fully explicit smoothing of fields (not positions)
bool scaleMesh(const labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
Move mesh with given scale. Return true if mesh ok or has.
void movePoints()
Update for new mesh geometry.
const indirectPrimitivePatch & patch() const
Reference to patch.
const pointMesh & pMesh() const
Reference to pointMesh.
const labelList & adaptPatchIndices() const
Patch labels that are being adapted.
const dictionary & paramDict() const
void correctBoundaryConditions(pointVectorField &) const
Special correctBoundaryConditions which evaluates fixedValue.
void modifyMotionPoints(pointField &newPoints) const
Apply optional point constraint (2d correction)
void operator=(const motionSmootherAlgo &)=delete
Disallow default bitwise assignment.
Mesh representing a set of points created from polyMesh.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< scalar > mag(const dimensioned< Type > &)
labelList pointLabels(nPoints, -1)