39 #ifndef snappySnapDriver_H 40 #define snappySnapDriver_H 53 class refinementParameters;
55 class pointConstraint;
56 class layerParameters;
57 class displacementMotionSolver;
58 class addPatchCellLayer;
87 void doSnapBufferLayers
92 const scalar featureCos,
93 const scalar planarAngle,
99 static label getCollocatedPoints
125 const bitSet& isMasterPoint,
141 const scalar cellSizeFraction
149 const word& allEdgePatchName,
150 const word& allPointPatchName
180 void checkCoupledFaceZones()
const;
198 static bool outwardsDisplacement
205 static void freezeExposedPoints
215 void detectWarpedFaces
217 const scalar featureCos,
226 labelList getInternalOrBaffleDuplicateFace()
const;
229 static void getZoneSurfacePoints
233 const word& zoneName,
239 template<
class FaceList>
243 const FaceList& faces
248 static void calcNearestSurface
273 const scalar featureCos,
275 const bitSet& isFeatureEdge,
279 void smoothAndConstrain
281 const bitSet& isMasterEdge,
313 void calcNearestFacePointProperties
328 void correctAttraction
341 void stringFeatureEdges
344 const scalar featureCos,
360 void releasePointsNextToMultiPatch
363 const scalar featureCos,
419 bool isSplitAlignedWithFeature
421 const scalar featureCos,
433 const scalar concaveCos
437 const scalar featureCos,
438 const scalar concaveCos,
439 const scalar minAreaFraction,
456 const scalar featureCos,
457 const scalar concaveCos,
458 const scalar minAreaFraction,
475 void avoidDiagonalAttraction
478 const scalar featureCos,
489 const bitSet& isMasterPoint,
514 const scalar featureCos,
515 const vector& faceSurfaceNormal,
521 void featureAttractionUsingReconstruction
524 const scalar featureCos,
547 void featureAttractionUsingReconstruction
550 const scalar featureCos,
567 void determineFeatures
570 const scalar featureCos,
571 const bool multiRegionFeatureSnap,
572 const bool strictRegionFeatureSnap,
595 void determineBaffleFeatures
598 const bool baffleFeaturePoints,
599 const scalar featureCos,
615 void reverseAttractMeshPoints
643 const bool isRegionEdge,
649 const point& estimatedPt,
665 const bool isRegionEdge,
671 const point& estimatedPt,
684 void featureAttractionUsingFeatureEdges
687 const bool multiRegionFeatureSnap,
688 const bool strictRegionFeatureSnap,
690 const bool detectBaffles,
691 const bool baffleFeaturePoints,
692 const bool releasePoints,
693 const bool stringFeatures,
694 const bool avoidDiagonal,
696 const scalar featureCos,
713 void preventFaceSqueeze
716 const scalar featureCos,
733 const bool alignMeshEdges,
734 const bool strictRegionFeatureSnap,
736 const scalar featureCos,
737 const scalar featureAttract,
773 const bool dryRun =
false 798 const label nInitErrors,
813 const scalar planarCos,
826 const bool strictRegionSnap,
860 const label nInitErrors,
882 const scalar featureCos,
883 const scalar planarAngle,
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
const labelList patchIDs(pbm.indices(polyPatchNames, true))
A class for handling file names.
bool scaleMesh(const snapParameters &snapParams, const label nInitErrors, const List< labelPair > &baffles, motionSmoother &)
Do the hard work: move the mesh according to displacement,.
A face is a list of labels corresponding to mesh vertices.
void doSnap(const dictionary &snapDict, const dictionary &motionDict, const meshRefinement::FaceMergeType mergeType, const scalar featureCos, const scalar planarAngle, const snapParameters &snapParams)
Snap onto surface & features.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
Container for data on surfaces used for surface-driven refinement. Contains all the data about the le...
Mesh representing a set of points created from polyMesh.
Application of (multi-)patch point constraints.
A list of faces which address into the list of points.
ClassName("snappySnapDriver")
Runtime type information.
FaceMergeType
Enumeration for what to do with co-planar patch faces on a single.
Adds layers of cells to outside (or inside) of polyMesh. Can optionally create stand-alone extruded m...
A class for handling words, derived from Foam::string.
Simple container to keep together snap specific information.
autoPtr< mapPolyMesh > repatchToSurface(const snapParameters &snapParams, const labelList &adaptPatchIDs, const labelList &preserveFaces)
Repatch faces according to surface nearest the face centre.
void smoothDisplacement(const snapParameters &snapParams, motionSmoother &) const
Smooth the displacement field to the internal.
static void preSmoothPatch(const meshRefinement &meshRefiner, const snapParameters &snapParams, const label nInitErrors, const List< labelPair > &baffles, motionSmoother &)
Smooth the mesh (patch and internal) to increase visibility.
Accumulates point constraints through successive applications of the applyConstraint function...
static scalarField calcSnapDistance(const fvMesh &mesh, const snapParameters &snapParams, const indirectPrimitivePatch &)
Calculate edge length per patch point.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static tmp< pointField > avgCellCentres(const fvMesh &mesh, const indirectPrimitivePatch &)
Helper: calculate average cell centre per point.
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))
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
All to do with snapping to surface.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void detectNearSurfaces(const scalar planarCos, const indirectPrimitivePatch &pp, const pointField &ppLocalPoints, const pointField &nearestPoint, const vectorField &nearestNormal, vectorField &disp) const
Per patch point override displacement if in gap situation.
Mesh data needed to do the Finite Volume discretisation.
autoPtr< mapPolyMesh > mergeZoneBaffles(const List< labelPair > &)
Merge baffles.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())