snappySnapDriver Class Reference

All to do with snapping to surface. More...

Public Member Functions

 ClassName ("snappySnapDriver")
 Runtime type information. More...
 
 snappySnapDriver (meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch)
 Construct from components. More...
 
 snappySnapDriver (const snappySnapDriver &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< polyTopoChangeMapmergeZoneBaffles (const List< labelPair > &)
 Merge baffles. More...
 
void detectNearSurfaces (const scalar planarCos, const indirectPrimitivePatch &, const pointField &nearestPoint, const vectorField &nearestNormal, vectorField &disp) const
 Per patch point override displacement if in gap situation. More...
 
void smoothDisplacement (const snapParameters &snapParams, motionSmoother &) const
 Smooth the displacement field to the internal. More...
 
bool scaleMesh (const snapParameters &snapParams, const label nInitErrors, const List< labelPair > &baffles, motionSmoother &)
 Do the hard work: move the mesh according to displacement,. More...
 
autoPtr< polyTopoChangeMaprepatchToSurface (const snapParameters &snapParams, const labelList &adaptPatchIDs, const labelList &preserveFaces)
 Repatch faces according to surface nearest the face centre. More...
 
void doSnap (const dictionary &snapDict, const dictionary &motionDict, const scalar featureCos, const scalar planarAngle, const snapParameters &snapParams)
 
void operator= (const snappySnapDriver &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static scalarField calcSnapDistance (const fvMesh &mesh, const snapParameters &snapParams, const indirectPrimitivePatch &)
 Calculate edge length per patch point. More...
 
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. More...
 
static labelList getZoneSurfacePoints (const fvMesh &mesh, const indirectPrimitivePatch &, const word &zoneName)
 Get points both on patch and facezone. More...
 
static tmp< pointFieldavgCellCentres (const fvMesh &mesh, const indirectPrimitivePatch &)
 Helper: calculate average cell centre per point. More...
 
static vectorField calcNearestSurface (const meshRefinement &meshRefiner, const scalarField &snapDist, const indirectPrimitivePatch &, pointField &nearestPoint, vectorField &nearestNormal)
 Per patch point calculate point on nearest surface. Set as. More...
 

Detailed Description

All to do with snapping to surface.

Source files

Definition at line 54 of file snappySnapDriver.H.

Constructor & Destructor Documentation

◆ snappySnapDriver() [1/2]

snappySnapDriver ( meshRefinement meshRefiner,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch 
)

Construct from components.

Definition at line 568 of file snappySnapDriver.C.

◆ snappySnapDriver() [2/2]

snappySnapDriver ( const snappySnapDriver )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "snappySnapDriver"  )

Runtime type information.

◆ mergeZoneBaffles()

Foam::autoPtr< Foam::polyTopoChangeMap > mergeZoneBaffles ( const List< labelPair > &  baffles)

Merge baffles.

Definition at line 583 of file snappySnapDriver.C.

References Foam::endl(), surfaceZonesInfo::getNamedSurfaces(), Foam::Info, Foam::nl, Foam::returnReduce(), and List< T >::size().

Here is the call graph for this function:

◆ calcSnapDistance()

◆ preSmoothPatch()

void preSmoothPatch ( const meshRefinement meshRefiner,
const snapParameters snapParams,
const label  nInitErrors,
const List< labelPair > &  baffles,
motionSmoother meshMover 
)
static

◆ getZoneSurfacePoints()

◆ avgCellCentres()

◆ detectNearSurfaces()

◆ calcNearestSurface()

◆ smoothDisplacement()

◆ scaleMesh()

bool scaleMesh ( const snapParameters snapParams,
const label  nInitErrors,
const List< labelPair > &  baffles,
motionSmoother meshMover 
)

Do the hard work: move the mesh according to displacement,.

locally relax the displacement. Return true if ended up with correct mesh, false if not.

Definition at line 1772 of file snappySnapDriver.C.

References cpuTime::cpuTimeIncrement(), motionSmootherData::displacement(), Foam::endl(), Foam::identityMap(), Foam::Info, Foam::mag(), meshRefinement::MESH, primitiveMesh::nFaces(), Foam::nl, snapParameters::nSnap(), motionSmootherAlgo::scaleMesh(), motionSmootherAlgo::setErrorReduction(), fvMesh::time(), fvMesh::write(), and regIOobject::write().

Here is the call graph for this function:

◆ repatchToSurface()

◆ doSnap()

void doSnap ( const dictionary snapDict,
const dictionary motionDict,
const scalar  featureCos,
const scalar  planarAngle,
const snapParameters snapParams 
)

Only if in feature attraction mode:

Nearest feature

Definition at line 2097 of file snappySnapDriver.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), meshRefinement::ATTRACTION, surfaceZonesInfo::BAFFLE, surfaceZonesInfo::BOUNDARY, motionSmootherAlgo::checkMesh(), motionSmootherAlgo::correct(), Foam::cos(), cpuTime::cpuTimeIncrement(), Foam::degToRad(), snapParameters::detectNearSurfacesSnap(), motionSmootherData::displacement(), Foam::endl(), f(), Foam::faceMap(), polyMesh::faces(), polyMesh::faceZones(), MeshZones< ZoneType, MeshType >::findZoneID(), Pair< Type >::first(), forAll, Foam::Info, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), meshRefinement::makeDisplacementField(), meshRefinement::makePatch(), VectorSpace< Form, Cmpt, Ncmpts >::max, meshRefinement::MESH, OSstream::name(), fileName::name(), Foam::name(), refinementSurfaces::names(), DemandDrivenMeshObject< polyMesh, PatchMeshObject, pointMesh >::New(), primitiveMesh::nFaces(), snapParameters::nFeatureSnap(), Foam::nl, primitiveMesh::nPoints(), PrimitivePatch< FaceList, PointField >::nPoints(), Time::path(), Foam::Pout, Foam::returnReduce(), Pair< Type >::second(), motionSmootherAlgo::setDisplacement(), List< T >::setSize(), HashTable< T, Key, Hash >::size(), List< T >::size(), refinementSurfaces::surfaces(), refinementSurfaces::surfZones(), syncTools::syncFaceList(), syncTools::syncPointList(), fvMesh::time(), List< T >::transfer(), meshRefinement::updateList(), autoPtr< T >::valid(), WarningInFunction, regIOobject::write(), Ostream::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.

Here is the call graph for this function:

◆ operator=()

void operator= ( const snappySnapDriver )
delete

Disallow default bitwise assignment.


The documentation for this class was generated from the following files: