Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
meshRefinement Class Reference

Helper class which maintains intersections of (changing) mesh with (static) surfaces. More...

Collaboration diagram for meshRefinement:
Collaboration graph
[legend]

Public Types

enum  debugType {
  MESH = (1 << 0), OBJINTERSECTIONS = (1 << 1), FEATURESEEDS = (1 << 2), ATTRACTION = (1 << 3),
  LAYERINFO = (1 << 4)
}
 
enum  writeType {
  WRITEMESH = (1 << 0), NOWRITEREFINEMENT = (1 << 1), WRITELEVELS = (1 << 2), WRITELAYERSETS = (1 << 3),
  WRITELAYERFIELDS = (1 << 4)
}
 
enum  mapType { MASTERONLY = 1, KEEPALL = 2, REMOVE = 4 }
 
enum  FaceMergeType { NONE, GEOMETRIC, IGNOREPATCH }
 

Public Member Functions

 ClassName ("meshRefinement")
 
 meshRefinement (fvMesh &mesh, const scalar mergeDistance, const bool overwrite, const refinementSurfaces &, const refinementFeatures &, const shellSurfaces &, const shellSurfaces &, const labelUList &checkFaces, const bool dryRun)
 
const fvMeshmesh () const
 
fvMeshmesh ()
 
scalar mergeDistance () const
 
bool overwrite () const
 
const wordoldInstance () const
 
const refinementSurfacessurfaces () const
 
const refinementFeaturesfeatures () const
 
const shellSurfacesshells () const
 
const shellSurfaceslimitShells () const
 
const hexRef8meshCutter () const
 
const labelListsurfaceIndex () const
 
labelListsurfaceIndex ()
 
const Map< label > & faceToCoupledPatch () const
 
const List< Tuple2< mapType, labelList > > & userFaceData () const
 
List< Tuple2< mapType, labelList > > & userFaceData ()
 
label countHits () const
 
autoPtr< mapDistributePolyMeshbalance (const bool keepZoneFaces, const bool keepBaffles, const scalarField &cellWeights, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 
labelList intersectedFaces () const
 
labelList intersectedPoints () const
 
bool isGap (const scalar, const vector &, const vector &, const vector &, const vector &) const
 
bool isNormalGap (const scalar planarCos, const label level0, const vector &point0, const vector &normal0, const label level1, const vector &point1, const vector &normal1) const
 
labelList refineCandidates (const pointField &keepPoints, const scalar curvature, const scalar planarAngle, const bool featureRefinement, const bool featureDistanceRefinement, const bool internalRefinement, const bool surfaceRefinement, const bool curvatureRefinement, const bool smallFeatureRefinement, const bool gapRefinement, const bool bigGapRefinement, const bool spreadGapSize, const label maxGlobalCells, const label maxLocalCells) const
 
void markOutsideFaces (const labelList &cellLevel, const labelList &neiLevel, const labelList &refineCell, bitSet &isOutsideFace) const
 
label countFaceDirs (const bitSet &isOutsideFace, const label celli) const
 
void growSet (const labelList &neiLevel, const bitSet &isOutsideFace, labelList &refineCell, label &nRefine) const
 
autoPtr< mapPolyMeshremoveGapCells (const scalar planarAngle, const labelList &minSurfaceLevel, const labelList &globalToMasterPatch, const label growIter)
 
autoPtr< mapPolyMeshrefine (const labelList &cellsToRefine)
 
autoPtr< mapDistributePolyMeshrefineAndBalance (const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance)
 
autoPtr< mapDistributePolyMeshbalanceAndRefine (const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance)
 
labelList directionalRefineCandidates (const label maxGlobalCells, const label maxLocalCells, const labelList &currentLevel, const direction dir) const
 
autoPtr< mapPolyMeshdirectionalRefine (const string &msg, const direction cmpt, const labelList &cellsToRefine)
 
void baffleAndSplitMesh (const bool handleSnapProblems, const snapParameters &snapParams, const bool useTopologicalSnapDetection, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const label nErodeCellZones, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList &regionsInMesh, const pointField &locationsOutsideMesh, const writer< scalar > &leakPathFormatter)
 
void mergeFreeStandingBaffles (const snapParameters &snapParams, const bool useTopologicalSnapDetection, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const scalar planarAngle, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const writer< scalar > &leakPathFormatter)
 
autoPtr< mapPolyMeshsplitMesh (const label nBufferLayers, const label nErodeCellZones, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList &regionsInMesh, const pointField &locationsOutsideMesh, const writer< scalar > &leakPathFormatter)
 
autoPtr< mapPolyMeshremoveLimitShells (const label nBufferLayers, const label nErodeCellZones, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList &regionsInMesh)
 
autoPtr< mapPolyMeshdupNonManifoldPoints (const localPointRegion &)
 
autoPtr< mapPolyMeshdupNonManifoldPoints ()
 
autoPtr< mapPolyMeshdupNonManifoldBoundaryPoints ()
 
autoPtr< mapPolyMeshmergePoints (const labelList &pointToDuplicate)
 
autoPtr< mapPolyMeshcreateBaffles (const labelList &ownPatch, const labelList &neiPatch)
 
labelList getZones (const List< surfaceZonesInfo::faceZoneType > &fzTypes) const
 
void getZoneFaces (const labelList &zoneIDs, labelList &faceZoneID, labelList &ownPatch, labelList &neiPatch, labelList &nBaffles) const
 
autoPtr< mapPolyMeshcreateZoneBaffles (const labelList &zoneIDs, List< labelPair > &baffles, labelList &originatingFaceZone)
 
autoPtr< mapPolyMeshmergeBaffles (const List< labelPair > &, const Map< label > &faceToPatch)
 
autoPtr< mapPolyMeshmergeZoneBaffles (const bool doInternalZones, const bool doBaffleZones)
 
autoPtr< mapPolyMeshzonify (const bool allowFreeStandingZoneFaces, const label nErodeCellZones, const pointField &locationsInMesh, const wordList &regionsInMesh, wordPairHashTable &zonesToFaceZone)
 
label addMeshedPatch (const word &name, const dictionary &)
 
labelList meshedPatches () const
 
label addFaceZone (const word &fzName, const word &masterPatch, const word &slavePatch, const surfaceZonesInfo::faceZoneType &fzType)
 
bool getFaceZoneInfo (const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const
 
void selectSeparatedCoupledFaces (boolList &) const
 
void updateIntersections (const labelList &changedFaces)
 
autoPtr< mapPolyMeshsplitMeshRegions (const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const bool exitIfLeakPath, const writer< scalar > &leakPathFormatter)
 
autoPtr< mapPolyMeshdoRemoveCells (const labelList &cellsToRemove, const labelList &exposedFaces, const labelList &exposedPatchIDs, removeCells &cellRemover)
 
void doSplitFaces (const labelList &splitFaces, const labelPairList &splits, polyTopoChange &meshMod) const
 
label splitFacesUndo (const labelList &splitFaces, const labelPairList &splits, const dictionary &motionDict, labelList &duplicateFace, List< labelPair > &baffles)
 
void distribute (const mapDistributePolyMesh &)
 
void updateMesh (const mapPolyMesh &, const labelList &changedFaces)
 
void storeData (const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
 
void updateMesh (const mapPolyMesh &, const labelList &changedFaces, const Map< label > &pointsToRestore, const Map< label > &facesToRestore, const Map< label > &cellsToRestore)
 
label mergePatchFaces (const scalar minCos, const scalar concaveCos, const label mergeSize, const labelList &patchIDs, const meshRefinement::FaceMergeType mergeType)
 
label mergePatchFacesUndo (const scalar minCos, const scalar concaveCos, const labelList &patchIDs, const dictionary &motionDict, const labelList &preserveFaces, const meshRefinement::FaceMergeType mergeType)
 
autoPtr< mapPolyMeshdoRemovePoints (removePoints &pointRemover, const boolList &pointCanBeDeleted)
 
autoPtr< mapPolyMeshdoRestorePoints (removePoints &pointRemover, const labelList &facesToRestore)
 
labelList collectFaces (const labelList &candidateFaces, const labelHashSet &set) const
 
labelList growFaceCellFace (const labelUList &set) const
 
labelList growFaceCellFace (const labelHashSet &set) const
 
label mergeEdgesUndo (const scalar minCos, const dictionary &motionDict)
 
void checkData ()
 
template<class T >
void testSyncBoundaryFaceList (const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const
 
void printMeshInfo (const bool, const string &) const
 
word timeName () const
 
void setInstance (const fileName &)
 
bool write () const
 
void dumpRefinementLevel () const
 
void dumpIntersections (const fileName &prefix) const
 
void write (const debugType debugFlags, const writeType writeFlags, const fileName &) const
 

Static Public Member Functions

static autoPtr< indirectPrimitivePatchmakePatch (const polyMesh &, const labelList &)
 
static tmp< pointVectorFieldmakeDisplacementField (const pointMesh &pMesh, const labelList &adaptPatchIDs)
 
static void checkCoupledFaceZones (const polyMesh &)
 
static void calculateEdgeWeights (const polyMesh &mesh, const bitSet &isMasterEdge, const labelList &meshPoints, const edgeList &edges, scalarField &edgeWeights, scalarField &invSumWeight)
 
template<class Type >
static void weightedSum (const polyMesh &mesh, const bitSet &isMasterEdge, const labelList &meshPoints, const edgeList &edges, const scalarField &edgeWeights, const Field< Type > &data, Field< Type > &sum)
 
static List< labelPairsubsetBaffles (const polyMesh &mesh, const labelList &zoneIDs, const List< labelPair > &baffles)
 
static label appendPatch (fvMesh &, const label insertPatchi, const word &, const dictionary &)
 
static label addPatch (fvMesh &, const word &name, const dictionary &)
 
static label findRegion (const polyMesh &, const labelList &cellRegion, const vector &perturbVec, const point &p)
 
static label findRegions (const polyMesh &, const vector &perturbVec, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const bool exitIfLeakPath, const writer< scalar > &leakPathFormatter, const label nRegions, labelList &cellRegion, const boolList &blockedFace)
 
template<class T >
static void updateList (const labelList &newToOld, const T &nullValue, List< T > &elems)
 
static void testSyncPointList (const string &msg, const polyMesh &mesh, const List< scalar > &fld)
 
static void testSyncPointList (const string &msg, const polyMesh &mesh, const List< point > &fld)
 
template<class T >
static void collectAndPrint (const UList< point > &points, const UList< T > &data)
 
static bitSet getMasterPoints (const polyMesh &mesh, const labelList &meshPoints)
 
static bitSet getMasterEdges (const polyMesh &mesh, const labelList &meshEdges)
 
static void removeFiles (const polyMesh &)
 
template<class T >
static T gAverage (const bitSet &isMasterElem, const UList< T > &values)
 
static writeType writeLevel ()
 
static void writeLevel (const writeType)
 
template<class EnumContainer >
static int readFlags (const EnumContainer &namedEnum, const wordList &words)
 
template<class Type >
static Type get (const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX, const Type &deflt=Zero)
 
static const dictionarysubDict (const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
 
static ITstreamlookup (const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
 

Static Public Attributes

static const Enum< debugTypedebugTypeNames
 
static const Enum< writeTypewriteTypeNames
 

Detailed Description

Helper class which maintains intersections of (changing) mesh with (static) surfaces.

Maintains

Source files

Definition at line 81 of file meshRefinement.H.

Member Enumeration Documentation

◆ debugType

enum debugType
Enumerator
MESH 
OBJINTERSECTIONS 
FEATURESEEDS 
ATTRACTION 
LAYERINFO 

Definition at line 88 of file meshRefinement.H.

◆ writeType

enum writeType
Enumerator
WRITEMESH 
NOWRITEREFINEMENT 
WRITELEVELS 
WRITELAYERSETS 
WRITELAYERFIELDS 

Definition at line 108 of file meshRefinement.H.

◆ mapType

enum mapType
Enumerator
MASTERONLY 

maintain master only

KEEPALL 

have slaves (upon refinement) from master

REMOVE 

set value to -1 any face that was refined

Definition at line 120 of file meshRefinement.H.

◆ FaceMergeType

Enumerator
NONE 
GEOMETRIC 
IGNOREPATCH 

Definition at line 129 of file meshRefinement.H.

Constructor & Destructor Documentation

◆ meshRefinement()

meshRefinement ( fvMesh mesh,
const scalar  mergeDistance,
const bool  overwrite,
const refinementSurfaces surfaces,
const refinementFeatures features,
const shellSurfaces shells,
const shellSurfaces limitShells,
const labelUList checkFaces,
const bool  dryRun 
)

Definition at line 1449 of file meshRefinement.C.

Member Function Documentation

◆ ClassName()

ClassName ( "meshRefinement"  )

◆ mesh() [1/2]

const fvMesh& mesh ( ) const
inline

Definition at line 940 of file meshRefinement.H.

Referenced by snappyRefineDriver::addFaceZones(), snappySnapDriver::calcNearestSurface(), and snappySnapDriver::preSmoothPatch().

Here is the caller graph for this function:

◆ mesh() [2/2]

fvMesh& mesh ( )
inline

Definition at line 944 of file meshRefinement.H.

◆ mergeDistance()

scalar mergeDistance ( ) const
inline

Definition at line 949 of file meshRefinement.H.

◆ overwrite()

bool overwrite ( ) const
inline

Definition at line 955 of file meshRefinement.H.

◆ oldInstance()

const word& oldInstance ( ) const
inline

Definition at line 961 of file meshRefinement.H.

◆ surfaces()

const refinementSurfaces& surfaces ( ) const
inline

Definition at line 967 of file meshRefinement.H.

Referenced by snappySnapDriver::calcNearestSurface().

Here is the caller graph for this function:

◆ features()

const refinementFeatures& features ( ) const
inline

Definition at line 973 of file meshRefinement.H.

◆ shells()

const shellSurfaces& shells ( ) const
inline

Definition at line 979 of file meshRefinement.H.

◆ limitShells()

const shellSurfaces& limitShells ( ) const
inline

Definition at line 985 of file meshRefinement.H.

◆ meshCutter()

const hexRef8& meshCutter ( ) const
inline

Definition at line 991 of file meshRefinement.H.

◆ surfaceIndex() [1/2]

Foam::labelList & surfaceIndex ( ) const

Definition at line 1498 of file meshRefinement.C.

References Foam::identity(), and meshRefinement::updateIntersections().

Here is the call graph for this function:

◆ surfaceIndex() [2/2]

labelList& surfaceIndex ( )

◆ faceToCoupledPatch()

const Map<label>& faceToCoupledPatch ( ) const
inline

Definition at line 1003 of file meshRefinement.H.

◆ userFaceData() [1/2]

const List<Tuple2<mapType, labelList> >& userFaceData ( ) const
inline

Definition at line 1012 of file meshRefinement.H.

◆ userFaceData() [2/2]

List<Tuple2<mapType, labelList> >& userFaceData ( )
inline

Definition at line 1017 of file meshRefinement.H.

◆ countHits()

Foam::label countHits ( ) const

Definition at line 1521 of file meshRefinement.C.

References forAll, syncTools::getMasterFaces(), and bitSet::test().

Here is the call graph for this function:

◆ balance()

Foam::autoPtr< Foam::mapDistributePolyMesh > balance ( const bool  keepZoneFaces,
const bool  keepBaffles,
const scalarField cellWeights,
decompositionMethod decomposer,
fvMeshDistribute distributor 
)

◆ intersectedFaces()

Foam::labelList intersectedFaces ( ) const

Definition at line 1792 of file meshRefinement.C.

References forAll.

◆ intersectedPoints()

Foam::labelList intersectedPoints ( ) const

Definition at line 1820 of file meshRefinement.C.

References f(), forAll, bitSet::set(), and bitSet::test().

Here is the call graph for this function:

◆ makePatch()

Foam::autoPtr< Foam::indirectPrimitivePatch > makePatch ( const polyMesh mesh,
const labelList patchIDs 
)
static

Definition at line 1893 of file meshRefinement.C.

References polyMesh::boundaryMesh(), polyMesh::faces(), forAll, mesh, autoPtr::New(), patches, polyMesh::points(), and polyPatch::start().

Referenced by snappyLayerDriver::addLayers(), snappySnapDriver::doSnap(), and snappySnapDriver::repatchToSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeDisplacementField()

Foam::tmp< Foam::pointVectorField > makeDisplacementField ( const pointMesh pMesh,
const labelList adaptPatchIDs 
)
static

Definition at line 1935 of file meshRefinement.C.

References IOobject::AUTO_WRITE, pointMesh::boundary(), Foam::dimLength, forAll, mesh, tmp::New(), IOobject::NO_READ, fvMesh::time(), Time::timeName(), and Foam::Zero.

Referenced by snappySnapDriver::doSnap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkCoupledFaceZones()

void checkCoupledFaceZones ( const polyMesh mesh)
static

◆ calculateEdgeWeights()

void calculateEdgeWeights ( const polyMesh mesh,
const bitSet isMasterEdge,
const labelList meshPoints,
const edgeList edges,
scalarField edgeWeights,
scalarField invSumWeight 
)
static

Definition at line 2076 of file meshRefinement.C.

References Foam::constant::electromagnetic::e, forAll, Foam::mag(), Foam::max(), mesh, polyMesh::points(), and PackedList::size().

Referenced by fieldSmoother::smoothLambdaMuDisplacement(), fieldSmoother::smoothNormals(), and fieldSmoother::smoothPatchNormals().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ weightedSum()

void weightedSum ( const polyMesh mesh,
const bitSet isMasterEdge,
const labelList meshPoints,
const edgeList edges,
const scalarField edgeWeights,
const Field< Type > &  data,
Field< Type > &  sum 
)
static

◆ isGap()

bool isGap ( const scalar  planarCos,
const vector point0,
const vector normal0,
const vector point1,
const vector normal1 
) const

Definition at line 1521 of file meshRefinementRefine.C.

References Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::zero, and Foam::Zero.

Here is the call graph for this function:

◆ isNormalGap()

bool isNormalGap ( const scalar  planarCos,
const label  level0,
const vector point0,
const vector normal0,
const label  level1,
const vector point1,
const vector normal1 
) const

Definition at line 1568 of file meshRefinementRefine.C.

References Foam::cos(), Foam::degToRad(), Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::zero, and Foam::Zero.

Here is the call graph for this function:

◆ refineCandidates()

Foam::labelList refineCandidates ( const pointField keepPoints,
const scalar  curvature,
const scalar  planarAngle,
const bool  featureRefinement,
const bool  featureDistanceRefinement,
const bool  internalRefinement,
const bool  surfaceRefinement,
const bool  curvatureRefinement,
const bool  smallFeatureRefinement,
const bool  gapRefinement,
const bool  bigGapRefinement,
const bool  spreadGapSize,
const label  maxGlobalCells,
const label  maxLocalCells 
) const

Definition at line 2025 of file meshRefinementRefine.C.

References Foam::cos(), Foam::degToRad(), Foam::endl(), forAll, Foam::Info, Foam::labelMax, Foam::max(), UPstream::nProcs(), and List::setSize().

Here is the call graph for this function:

◆ markOutsideFaces()

void markOutsideFaces ( const labelList cellLevel,
const labelList neiLevel,
const labelList refineCell,
bitSet isOutsideFace 
) const

Definition at line 157 of file meshRefinementBlock.C.

References forAll, bitSet::set(), PackedList::setSize(), and Foam::Zero.

Here is the call graph for this function:

◆ countFaceDirs()

Foam::label countFaceDirs ( const bitSet isOutsideFace,
const label  celli 
) const

Definition at line 215 of file meshRefinementBlock.C.

References forAll, Foam::magSqr(), n, and Foam::sqr().

Here is the call graph for this function:

◆ growSet()

void growSet ( const labelList neiLevel,
const bitSet isOutsideFace,
labelList refineCell,
label &  nRefine 
) const

Definition at line 266 of file meshRefinementBlock.C.

References cells, and forAll.

◆ removeGapCells()

Foam::autoPtr< Foam::mapPolyMesh > removeGapCells ( const scalar  planarAngle,
const labelList minSurfaceLevel,
const labelList globalToMasterPatch,
const label  growIter 
)

◆ refine()

Foam::autoPtr< Foam::mapPolyMesh > refine ( const labelList cellsToRefine)

Definition at line 2333 of file meshRefinementRefine.C.

References polyTopoChange::changeMesh(), mapPolyMesh::hasMotionPoints(), mapPolyMesh::preMotionPoints(), and timeName.

Here is the call graph for this function:

◆ refineAndBalance()

Foam::autoPtr< Foam::mapDistributePolyMesh > refineAndBalance ( const string msg,
decompositionMethod decomposer,
fvMeshDistribute distributor,
const labelList cellsToRefine,
const scalar  maxLoadUnbalance 
)

◆ balanceAndRefine()

Foam::autoPtr< Foam::mapDistributePolyMesh > balanceAndRefine ( const string msg,
decompositionMethod decomposer,
fvMeshDistribute distributor,
const labelList cellsToRefine,
const scalar  maxLoadUnbalance 
)

◆ directionalRefineCandidates()

Foam::labelList directionalRefineCandidates ( const label  maxGlobalCells,
const label  maxLocalCells,
const labelList currentLevel,
const direction  dir 
) const

Definition at line 2636 of file meshRefinementRefine.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Foam::Info, Foam::labelMax, UPstream::nProcs(), Foam::Pout, and List::setSize().

Here is the call graph for this function:

◆ directionalRefine()

Foam::autoPtr< Foam::mapPolyMesh > directionalRefine ( const string msg,
const direction  cmpt,
const labelList cellsToRefine 
)

Definition at line 2736 of file meshRefinementRefine.C.

References polyTopoChange::changeMesh(), forAll, meshCutter::setRefinement(), timeName, meshCutter::updateMesh(), and Foam::Zero.

Here is the call graph for this function:

◆ baffleAndSplitMesh()

void baffleAndSplitMesh ( const bool  handleSnapProblems,
const snapParameters snapParams,
const bool  useTopologicalSnapDetection,
const bool  removeEdgeConnectedCells,
const scalarField perpendicularAngle,
const label  nErodeCellZones,
const dictionary motionDict,
Time runTime,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const pointField locationsInMesh,
const wordList regionsInMesh,
const pointField locationsOutsideMesh,
const writer< scalar > &  leakPathFormatter 
)

◆ mergeFreeStandingBaffles()

void mergeFreeStandingBaffles ( const snapParameters snapParams,
const bool  useTopologicalSnapDetection,
const bool  removeEdgeConnectedCells,
const scalarField perpendicularAngle,
const scalar  planarAngle,
const dictionary motionDict,
Time runTime,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const pointField locationsInMesh,
const pointField locationsOutsideMesh,
const writer< scalar > &  leakPathFormatter 
)

◆ splitMesh()

Foam::autoPtr< Foam::mapPolyMesh > splitMesh ( const label  nBufferLayers,
const label  nErodeCellZones,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const pointField locationsInMesh,
const wordList regionsInMesh,
const pointField locationsOutsideMesh,
const writer< scalar > &  leakPathFormatter 
)

Definition at line 4407 of file meshRefinementBaffles.C.

References forAll, regionSplit::nRegions(), VectorSpace< Vector< scalar >, scalar, 3 >::one, and syncTools::syncFaceList().

Here is the call graph for this function:

◆ removeLimitShells()

Foam::autoPtr< Foam::mapPolyMesh > removeLimitShells ( const label  nBufferLayers,
const label  nErodeCellZones,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const pointField locationsInMesh,
const wordList regionsInMesh 
)

Definition at line 4715 of file meshRefinementBaffles.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), forAll, meshRefinement::MESH, Foam::Pout, timeName, Foam::vtk::write(), and Foam::Zero.

Here is the call graph for this function:

◆ dupNonManifoldPoints() [1/2]

Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldPoints ( const localPointRegion regionSide)

◆ dupNonManifoldPoints() [2/2]

Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldPoints ( )

Definition at line 4858 of file meshRefinementBaffles.C.

◆ dupNonManifoldBoundaryPoints()

Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldBoundaryPoints ( )

◆ mergePoints()

Foam::autoPtr< Foam::mapPolyMesh > mergePoints ( const labelList pointToDuplicate)

◆ createBaffles()

Foam::autoPtr< Foam::mapPolyMesh > createBaffles ( const labelList ownPatch,
const labelList neiPatch 
)

◆ getZones()

Foam::labelList getZones ( const List< surfaceZonesInfo::faceZoneType > &  fzTypes) const

Definition at line 652 of file meshRefinementBaffles.C.

References List::append(), forAll, zoneIdentifier::name(), and zoneIDs.

Here is the call graph for this function:

◆ subsetBaffles()

Foam::List< Foam::labelPair > subsetBaffles ( const polyMesh mesh,
const labelList zoneIDs,
const List< labelPair > &  baffles 
)
static

Definition at line 679 of file meshRefinementBaffles.C.

References DynamicList::append(), polyMesh::faceZones(), forAll, mesh, primitiveMesh::nFaces(), p, zoneID, and zoneIDs.

Referenced by snappyLayerDriver::addLayers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getZoneFaces()

void getZoneFaces ( const labelList zoneIDs,
labelList faceZoneID,
labelList ownPatch,
labelList neiPatch,
labelList nBaffles 
) const

Definition at line 712 of file meshRefinementBaffles.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, zoneIdentifier::name(), List::setSize(), Foam::Zero, and zoneIDs.

Here is the call graph for this function:

◆ createZoneBaffles()

Foam::autoPtr< Foam::mapPolyMesh > createZoneBaffles ( const labelList zoneIDs,
List< labelPair > &  baffles,
labelList originatingFaceZone 
)

◆ mergeBaffles()

Foam::autoPtr< Foam::mapPolyMesh > mergeBaffles ( const List< labelPair > &  couples,
const Map< label > &  faceToPatch 
)

◆ mergeZoneBaffles()

Foam::autoPtr< Foam::mapPolyMesh > mergeZoneBaffles ( const bool  doInternalZones,
const bool  doBaffleZones 
)

◆ zonify()

Foam::autoPtr< Foam::mapPolyMesh > zonify ( const bool  allowFreeStandingZoneFaces,
const label  nErodeCellZones,
const pointField locationsInMesh,
const wordList regionsInMesh,
wordPairHashTable zonesToFaceZone 
)

◆ appendPatch()

Foam::label appendPatch ( fvMesh mesh,
const label  insertPatchi,
const word patchName,
const dictionary patchDict 
)
static

Definition at line 2132 of file meshRefinement.C.

References fvMesh::boundary(), polyMesh::boundaryMesh(), fvMesh::clearOut(), mesh, fvPatch::New(), polyPatch::New(), PtrList::set(), and PtrList::setSize().

Here is the call graph for this function:

◆ addPatch()

Foam::label addPatch ( fvMesh mesh,
const word name,
const dictionary patchInfo 
)
static

◆ addMeshedPatch()

Foam::label addMeshedPatch ( const word name,
const dictionary patchInfo 
)

Definition at line 2308 of file meshRefinement.C.

References Foam::name().

Referenced by snappyRefineDriver::addFaceZones().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshedPatches()

Foam::labelList meshedPatches ( ) const

◆ addFaceZone()

Foam::label addFaceZone ( const word fzName,
const word masterPatch,
const word slavePatch,
const surfaceZonesInfo::faceZoneType fzType 
)

Definition at line 2385 of file meshRefinement.C.

References surfaceZonesInfo::addFaceZone().

Referenced by snappyRefineDriver::addFaceZones().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFaceZoneInfo()

bool getFaceZoneInfo ( const word fzName,
label &  masterPatchID,
label &  slavePatchID,
surfaceZonesInfo::faceZoneType fzType 
) const

Definition at line 2409 of file meshRefinement.C.

References polyBoundaryMesh::findPatchID().

Here is the call graph for this function:

◆ selectSeparatedCoupledFaces()

void selectSeparatedCoupledFaces ( boolList selected) const

Definition at line 2437 of file meshRefinement.C.

References polyPatch::boundaryMesh().

Here is the call graph for this function:

◆ updateIntersections()

void updateIntersections ( const labelList changedFaces)

Definition at line 291 of file meshRefinement.C.

References bitSet::count(), stdFoam::end(), Foam::endl(), forAll, syncTools::getMasterFaces(), Foam::Info, Foam::nl, Foam::reduce(), Foam::returnReduce(), syncTools::syncFaceList(), and bitSet::test().

Referenced by meshRefinement::surfaceIndex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findRegion()

Foam::label findRegion ( const polyMesh mesh,
const labelList cellRegion,
const vector perturbVec,
const point p 
)
static

Definition at line 2453 of file meshRefinement.C.

References polyMesh::findCell(), findCellMode(), mesh, p, Foam::reduce(), and polyMesh::tetBasePtIs().

Here is the call graph for this function:

◆ findRegions()

Foam::label findRegions ( const polyMesh mesh,
const vector perturbVec,
const pointField locationsInMesh,
const pointField locationsOutsideMesh,
const bool  exitIfLeakPath,
const writer< scalar > &  leakPathFormatter,
const label  nRegions,
labelList cellRegion,
const boolList blockedFace 
)
static

◆ splitMeshRegions()

Foam::autoPtr< Foam::mapPolyMesh > splitMeshRegions ( const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const pointField locationsInMesh,
const pointField locationsOutsideMesh,
const bool  exitIfLeakPath,
const writer< scalar > &  leakPathFormatter 
)

◆ doRemoveCells()

Foam::autoPtr< Foam::mapPolyMesh > doRemoveCells ( const labelList cellsToRemove,
const labelList exposedFaces,
const labelList exposedPatchIDs,
removeCells cellRemover 
)

◆ doSplitFaces()

void doSplitFaces ( const labelList splitFaces,
const labelPairList splits,
polyTopoChange meshMod 
) const

◆ splitFacesUndo()

Foam::label splitFacesUndo ( const labelList splitFaces,
const labelPairList splits,
const dictionary motionDict,
labelList duplicateFace,
List< labelPair > &  baffles 
)

◆ distribute()

void distribute ( const mapDistributePolyMesh map)

◆ updateMesh() [1/2]

void updateMesh ( const mapPolyMesh map,
const labelList changedFaces 
)

Definition at line 2924 of file meshRefinement.C.

◆ updateList()

void updateList ( const labelList newToOld,
const T nullValue,
List< T > &  elems 
)
static

Definition at line 31 of file meshRefinementTemplates.C.

References forAll, and List::transfer().

Referenced by snappyLayerDriver::addLayers(), and meshRefinement::splitFacesUndo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeData()

void storeData ( const labelList pointsToStore,
const labelList facesToStore,
const labelList cellsToStore 
)

Definition at line 2936 of file meshRefinement.C.

◆ updateMesh() [2/2]

void updateMesh ( const mapPolyMesh map,
const labelList changedFaces,
const Map< label > &  pointsToRestore,
const Map< label > &  facesToRestore,
const Map< label > &  cellsToRestore 
)

Definition at line 2953 of file meshRefinement.C.

References mapPolyMesh::faceMap(), forAll, forAllConstIters(), mapPolyMesh::reverseFaceMap(), and dictionary::transfer().

Here is the call graph for this function:

◆ mergePatchFaces()

Foam::label mergePatchFaces ( const scalar  minCos,
const scalar  concaveCos,
const label  mergeSize,
const labelList patchIDs,
const meshRefinement::FaceMergeType  mergeType 
)

◆ mergePatchFacesUndo()

Foam::label mergePatchFacesUndo ( const scalar  minCos,
const scalar  concaveCos,
const labelList patchIDs,
const dictionary motionDict,
const labelList preserveFaces,
const meshRefinement::FaceMergeType  mergeType 
)

◆ doRemovePoints()

Foam::autoPtr< Foam::mapPolyMesh > doRemovePoints ( removePoints pointRemover,
const boolList pointCanBeDeleted 
)

◆ doRestorePoints()

Foam::autoPtr< Foam::mapPolyMesh > doRestorePoints ( removePoints pointRemover,
const labelList facesToRestore 
)

◆ collectFaces()

Foam::labelList collectFaces ( const labelList candidateFaces,
const labelHashSet set 
) const

Definition at line 747 of file meshRefinementMerge.C.

References Foam::findIndices(), and Foam::BitOps::set().

Here is the call graph for this function:

◆ growFaceCellFace() [1/2]

Foam::labelList growFaceCellFace ( const labelUList set) const

Definition at line 810 of file meshRefinementMerge.C.

References Foam::findIndices(), Foam::markGrowFaceCellFace(), and Foam::BitOps::set().

Here is the call graph for this function:

◆ growFaceCellFace() [2/2]

Foam::labelList growFaceCellFace ( const labelHashSet set) const

Definition at line 833 of file meshRefinementMerge.C.

References Foam::findIndices(), Foam::markGrowFaceCellFace(), and Foam::BitOps::set().

Here is the call graph for this function:

◆ mergeEdgesUndo()

Foam::label mergeEdgesUndo ( const scalar  minCos,
const dictionary motionDict 
)

◆ checkData()

void checkData ( )

◆ testSyncPointList() [1/2]

void testSyncPointList ( const string msg,
const polyMesh mesh,
const List< scalar > &  fld 
)
static

◆ testSyncPointList() [2/2]

void testSyncPointList ( const string msg,
const polyMesh mesh,
const List< point > &  fld 
)
static

◆ testSyncBoundaryFaceList()

void testSyncBoundaryFaceList ( const scalar  mergeDistance,
const string msg,
const UList< T > &  faceData,
const UList< T > &  syncedFaceData 
) const

Definition at line 98 of file meshRefinementTemplates.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), patchIdentifier::name(), patches, UList::size(), polyPatch::start(), and T.

Here is the call graph for this function:

◆ collectAndPrint()

void collectAndPrint ( const UList< point > &  points,
const UList< T > &  data 
)
static

Definition at line 155 of file meshRefinementTemplates.C.

References Foam::DelaunayMeshTools::allPoints(), Foam::endl(), Foam::Info, Foam::mag(), points, and Foam::sortedOrder().

Here is the call graph for this function:

◆ getMasterPoints()

Foam::bitSet getMasterPoints ( const polyMesh mesh,
const labelList meshPoints 
)
static

Definition at line 3099 of file meshRefinement.C.

References forAll, Foam::identity(), Foam::labelMax, mesh, bitSet::set(), and syncTools::syncPointList().

Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::detectNearSurfaces(), and displacementMotionSolverMeshMover::move().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasterEdges()

Foam::bitSet getMasterEdges ( const polyMesh mesh,
const labelList meshEdges 
)
static

Definition at line 3135 of file meshRefinement.C.

References forAll, Foam::identity(), Foam::labelMax, globalIndex::localSize(), globalIndex::localStart(), mesh, bitSet::set(), syncTools::syncEdgeList(), and globalIndex::toGlobal().

Referenced by displacementMotionSolverMeshMover::move().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printMeshInfo()

void printMeshInfo ( const bool  debug,
const string msg 
) const

◆ timeName()

Foam::word timeName ( ) const

Definition at line 3223 of file meshRefinement.C.

Referenced by snappySnapDriver::preSmoothPatch().

Here is the caller graph for this function:

◆ setInstance()

void setInstance ( const fileName inst)

Definition at line 894 of file meshRefinement.C.

◆ write() [1/2]

bool write ( ) const

Definition at line 3063 of file meshRefinement.C.

References forAll, and s.

Referenced by snappySnapDriver::preSmoothPatch().

Here is the caller graph for this function:

◆ dumpRefinementLevel()

void dumpRefinementLevel ( ) const

◆ dumpIntersections()

void dumpIntersections ( const fileName prefix) const

Definition at line 3296 of file meshRefinement.C.

References stdFoam::end(), Foam::endl(), forAll, OFstream::name(), Foam::nl, Foam::Pout, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ write() [2/2]

void write ( const debugType  debugFlags,
const writeType  writeFlags,
const fileName prefix 
) const

Definition at line 3365 of file meshRefinement.C.

References Foam::vtk::write().

Here is the call graph for this function:

◆ removeFiles()

void removeFiles ( const polyMesh mesh)
static

◆ gAverage()

T gAverage ( const bitSet isMasterElem,
const UList< T > &  values 
)
static

◆ writeLevel() [1/2]

Foam::meshRefinement::writeType writeLevel ( )
static

Definition at line 3421 of file meshRefinement.C.

Referenced by snappyLayerDriver::addLayers(), snappySnapDriver::doSnap(), snappySnapDriver::preSmoothPatch(), and snappySnapDriver::smoothDisplacement().

Here is the caller graph for this function:

◆ writeLevel() [2/2]

void writeLevel ( const writeType  flags)
static

Definition at line 3427 of file meshRefinement.C.

◆ readFlags()

int readFlags ( const EnumContainer &  namedEnum,
const wordList words 
)
static

Definition at line 246 of file meshRefinementTemplates.C.

◆ get()

Type get ( const dictionary dict,
const word keyword,
const bool  noExit,
enum keyType::option  matchOpt = keyType::REGEX,
const Type &  deflt = Zero 
)
static

Definition at line 323 of file meshRefinementTemplates.C.

References dict, FatalIOErrorInFunction, dictionary::name(), Foam::nl, and dictionary::readEntry().

Here is the call graph for this function:

◆ subDict()

const Foam::dictionary & subDict ( const dictionary dict,
const word keyword,
const bool  noExit,
enum keyType::option  matchOpt = keyType::REGEX 
)
static

Definition at line 3446 of file meshRefinement.C.

References dictionary::csearch(), dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::name(), Foam::nl, and dictionary::null.

Referenced by layerParameters::layerParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup()

Foam::ITstream & lookup ( const dictionary dict,
const word keyword,
const bool  noExit,
enum keyType::option  matchOpt = keyType::REGEX 
)
static

Definition at line 3477 of file meshRefinement.C.

References dictionary::csearch(), dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::name(), and Foam::nl.

Here is the call graph for this function:

Member Data Documentation

◆ debugTypeNames

const Foam::Enum< Foam::meshRefinement::debugType > debugTypeNames
static

Definition at line 97 of file meshRefinement.H.

◆ writeTypeNames

const Foam::Enum< Foam::meshRefinement::writeType > writeTypeNames
static

Definition at line 117 of file meshRefinement.H.


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