All to do with snapping to surface. More...
Public Member Functions | |
ClassName ("snappySnapDriver") | |
snappySnapDriver (meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const bool dryRun=false) | |
autoPtr< mapPolyMesh > | mergeZoneBaffles (const List< labelPair > &) |
void | detectNearSurfaces (const scalar planarCos, const indirectPrimitivePatch &, const pointField &nearestPoint, const vectorField &nearestNormal, vectorField &disp) const |
void | smoothDisplacement (const snapParameters &snapParams, motionSmoother &) const |
bool | scaleMesh (const snapParameters &snapParams, const label nInitErrors, const List< labelPair > &baffles, motionSmoother &) |
autoPtr< mapPolyMesh > | repatchToSurface (const snapParameters &snapParams, const labelList &adaptPatchIDs, const labelList &preserveFaces) |
void | doSnap (const dictionary &snapDict, const dictionary &motionDict, const meshRefinement::FaceMergeType mergeType, const scalar featureCos, const scalar planarAngle, const snapParameters &snapParams) |
template<class FaceList > | |
Foam::labelList | getFacePoints (const indirectPrimitivePatch &pp, const FaceList &faces) |
Static Public Member Functions | |
static scalarField | calcSnapDistance (const fvMesh &mesh, const snapParameters &snapParams, const indirectPrimitivePatch &) |
static void | preSmoothPatch (const meshRefinement &meshRefiner, const snapParameters &snapParams, const label nInitErrors, const List< labelPair > &baffles, motionSmoother &) |
static tmp< pointField > | avgCellCentres (const fvMesh &mesh, const indirectPrimitivePatch &) |
static vectorField | calcNearestSurface (const bool strictRegionSnap, const meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const scalarField &snapDist, const indirectPrimitivePatch &, pointField &nearestPoint, vectorField &nearestNormal) |
All to do with snapping to surface.
Definition at line 54 of file snappySnapDriver.H.
snappySnapDriver | ( | meshRefinement & | meshRefiner, |
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const bool | dryRun = false |
||
) |
Definition at line 741 of file snappySnapDriver.C.
ClassName | ( | "snappySnapDriver" | ) |
autoPtr<mapPolyMesh> mergeZoneBaffles | ( | const List< labelPair > & | ) |
|
static |
Definition at line 758 of file snappySnapDriver.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), forAll, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::max(), mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), PrimitivePatch< FaceList, PointField >::pointEdges(), snapParameters::snapTol(), and syncTools::syncPointList().
|
static |
Definition at line 798 of file snappySnapDriver.C.
References addProfiling, motionSmootherAlgo::correct(), cpuTimePosix::cpuTimeIncrement(), Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Foam::Info, mesh, meshRefinement::MESH, meshRefinement::mesh(), primitiveMesh::nFaces(), Foam::nl, snapParameters::nSmoothInternal(), snapParameters::nSmoothPatch(), snapParameters::nSnap(), Time::path(), motionSmootherAlgo::pointDisplacement(), GeometricField::primitiveFieldRef(), motionSmootherAlgo::scaleMesh(), motionSmootherAlgo::setDisplacement(), motionSmootherAlgo::setErrorReduction(), List::setSize(), Foam::fvc::smooth(), fvMesh::time(), meshRefinement::timeName(), meshRefinement::write(), meshRefinement::writeLevel(), and meshRefinement::WRITEMESH.
|
static |
Definition at line 960 of file snappySnapDriver.C.
References primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, weightedPosition::getPoints(), mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), pFaces, PrimitivePatch< FaceList, PointField >::pointFaces(), tmp::ref(), and weightedPosition::syncPoints().
void detectNearSurfaces | ( | const scalar | planarCos, |
const indirectPrimitivePatch & | pp, | ||
const pointField & | nearestPoint, | ||
const vectorField & | nearestNormal, | ||
vectorField & | disp | ||
) | const |
Definition at line 1045 of file snappySnapDriver.C.
References meshRefinement::ATTRACTION, Foam::expressions::patchExpr::debug, stdFoam::end(), Foam::endl(), refinementSurfaces::findNearestIntersection(), forAll, meshRefinement::getMasterPoints(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), Foam::Info, PrimitivePatch< FaceList, PointField >::localPoints(), mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), PrimitivePatch< FaceList, PointField >::nPoints(), Time::path(), autoPtr::reset(), Foam::returnReduce(), refinementSurfaces::surfaces(), refinementSurfaces::surfZones(), fvMesh::time(), and bitSet::toc().
|
static |
Definition at line 1725 of file snappySnapDriver.C.
References polyMesh::boundaryMesh(), cpuTimePosix::cpuTimeIncrement(), Foam::endl(), refinementSurfaces::findNearest(), refinementSurfaces::findNearestRegion(), forAll, meshRefinement::gAverage(), refinementSurfaces::geometry(), meshRefinement::getMasterPoints(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), refinementSurfaces::globalRegion(), Foam::gMax(), Foam::gMin(), Foam::identity(), Foam::Info, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), mesh, meshRefinement::mesh(), PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), Foam::Pout, Foam::returnReduce(), Foam::sqr(), refinementSurfaces::surfaces(), meshRefinement::surfaces(), refinementSurfaces::surfZones(), syncTools::syncPointList(), fvMesh::time(), bitSet::toc(), WarningInFunction, and Foam::Zero.
void smoothDisplacement | ( | const snapParameters & | snapParams, |
motionSmoother & | meshMover | ||
) | const |
Definition at line 2060 of file snappySnapDriver.C.
References cpuTimePosix::cpuTimeIncrement(), Foam::expressions::patchExpr::debug, motionSmootherData::displacement(), Foam::endl(), Foam::Info, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), mesh, meshRefinement::MESH, PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::nl, snapParameters::nSmoothDispl(), motionSmootherAlgo::patch(), Time::path(), motionSmootherAlgo::pMesh(), motionSmootherAlgo::smooth(), fvMesh::time(), Ostream::write(), meshRefinement::writeLevel(), and meshRefinement::WRITEMESH.
bool scaleMesh | ( | const snapParameters & | snapParams, |
const label | nInitErrors, | ||
const List< labelPair > & | baffles, | ||
motionSmoother & | meshMover | ||
) |
Definition at line 2134 of file snappySnapDriver.C.
References addProfiling, cpuTimePosix::cpuTimeIncrement(), Foam::expressions::patchExpr::debug, motionSmootherData::displacement(), Foam::endl(), Foam::identity(), Foam::Info, Foam::mag(), mesh, meshRefinement::MESH, primitiveMesh::nFaces(), Foam::nl, snapParameters::nSnap(), motionSmootherAlgo::scaleMesh(), motionSmootherAlgo::setErrorReduction(), fvMesh::time(), and fvMesh::write().
Foam::autoPtr< Foam::mapPolyMesh > repatchToSurface | ( | const snapParameters & | snapParams, |
const labelList & | adaptPatchIDs, | ||
const labelList & | preserveFaces | ||
) |
Definition at line 2201 of file snappySnapDriver.C.
References polyMesh::boundaryMesh(), cpuTimePosix::cpuTimeIncrement(), Foam::endl(), f(), primitiveMesh::faceCentres(), polyMesh::faceZones(), refinementSurfaces::findNearestRegion(), forAll, surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), refinementSurfaces::globalRegion(), Foam::Info, PrimitivePatch< FaceList, PointField >::localFaces(), meshRefinement::makePatch(), Foam::max(), mesh, primitiveMesh::nFaces(), Foam::nl, patches, Foam::returnReduce(), bitSet::set(), Foam::sqr(), polyPatch::start(), refinementSurfaces::surfaces(), refinementSurfaces::surfZones(), bitSet::test(), and fvMesh::time().
void doSnap | ( | const dictionary & | snapDict, |
const dictionary & | motionDict, | ||
const meshRefinement::FaceMergeType | mergeType, | ||
const scalar | featureCos, | ||
const scalar | planarAngle, | ||
const snapParameters & | snapParams | ||
) |
Definition at line 2500 of file snappySnapDriver.C.
References addProfiling, DynamicList::append(), meshRefinement::ATTRACTION, motionSmootherAlgo::checkMesh(), autoPtr::clear(), DynamicList::clear(), motionSmootherAlgo::correct(), Foam::cos(), cpuTimePosix::cpuTimeIncrement(), Foam::expressions::patchExpr::debug, Foam::degToRad(), snapParameters::detectNearSurfacesSnap(), motionSmootherData::displacement(), Foam::endl(), Foam::exit(), primitiveMesh::faceCentres(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, localPointRegion::findDuplicateFacePairs(), forAll, Foam::identity(), Foam::Info, surfaceZonesInfo::INTERNAL, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), meshRefinement::makeDisplacementField(), meshRefinement::makePatch(), VectorSpace< Vector< scalar >, scalar, 3 >::max, mesh, meshRefinement::MESH, Foam::name(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), primitiveMesh::nFaces(), snapParameters::nFaceSplitInterval(), snapParameters::nFeatureSnap(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), p, Time::path(), autoPtr::reset(), Foam::returnReduce(), motionSmootherAlgo::setDisplacement(), snapParameters::strictRegionSnap(), fvMesh::time(), WarningInFunction, Ostream::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.
Foam::labelList getFacePoints | ( | const indirectPrimitivePatch & | pp, |
const FaceList & | faces | ||
) |
Definition at line 28 of file snappySnapDriverTemplates.C.
References f(), Foam::findIndices(), forAll, PrimitivePatch< FaceList, PointField >::meshPointMap(), and PrimitivePatch< FaceList, PointField >::nPoints().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.