refinementParameters Class Reference

Simple container to keep together refinement specific information. More...

Public Member Functions

 refinementParameters (const dictionary &dict, const bool dryRun=false)
 Construct from dictionary - new syntax. More...
 
label maxGlobalCells () const
 Total number of cells. More...
 
label maxLocalCells () const
 Per processor max number of cells. More...
 
label minRefineCells () const
 When to stop refining. More...
 
scalar curvature () const
 Curvature. More...
 
scalar planarAngle () const
 Angle when two intersections are considered to be planar. More...
 
label nBufferLayers () const
 Number of layers between different refinement levels. More...
 
const pointFieldlocationsInMesh () const
 Areas to keep. More...
 
const wordListzonesInMesh () const
 Per area the zone name. More...
 
const pointFieldlocationsOutsideMesh () const
 Optional points which are checked to be outside the mesh. More...
 
bool useLeakClosure () const
 Whether to attempt to close any 'leak' between. More...
 
bool allowFreeStandingZoneFaces () const
 Are zone faces allowed only inbetween different cell zones. More...
 
bool useTopologicalSnapDetection () const
 Use old topology based problem-cell removal. More...
 
scalar maxLoadUnbalance () const
 Allowed load unbalance. More...
 
bool handleSnapProblems () const
 
bool interfaceRefine () const
 Refine cell with opposite faces with different refinement level. More...
 
label nErodeCellZone () const
 Number of iterations of erosion to get a consistent cellZone. More...
 
label nFilterIter () const
 Number of iterations of infill/erosion to get a smoother. More...
 
scalar minCellFraction () const
 When are disconnected regions small. Fraction of overall size. More...
 
label nMinCells () const
 When are disconnected regions small. Absolute number of cells. More...
 
dictionary getZoneInfo (const word &fzName, surfaceZonesInfo::faceZoneType &faceType) const
 Get patchInfo and faceType for faceZone. More...
 
labelList addCellZonesToMesh (polyMesh &) const
 Add cellZones to mesh. Return indices of cellZones (or -1) More...
 

Static Public Member Functions

static labelList findCells (const bool checkInsideMesh, const polyMesh &, const pointField &locations)
 Checks that cells are in mesh. Returns cells (or -1) they. More...
 
static labelList zonedLocations (const wordList &zonesInMesh)
 Extract indices of named locations (so excludes 'keepPoints') More...
 
static labelList unzonedLocations (const wordList &zonesInMesh)
 Extract indices of unnamed locations ('keepPoints') More...
 
static List< pointFieldzonePoints (const pointField &locationsInMesh, const wordList &zonesInMesh, const pointField &locationsOutsideMesh)
 Helper: per zone (entry in zonesInMesh) the locations with. More...
 

Detailed Description

Simple container to keep together refinement specific information.

Source files

Definition at line 58 of file refinementParameters.H.

Constructor & Destructor Documentation

◆ refinementParameters()

refinementParameters ( const dictionary dict,
const bool  dryRun = false 
)

Construct from dictionary - new syntax.

Definition at line 39 of file refinementParameters.C.

References List< T >::append(), Foam::cos(), Foam::degToRad(), dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, UList< T >::first(), forAll, dictionary::found(), IOWarningInFunction, dictionary::lookup(), nZones, dictionary::readIfPresent(), List< T >::setSize(), and UList< T >::size().

Here is the call graph for this function:

Member Function Documentation

◆ maxGlobalCells()

label maxGlobalCells ( ) const
inline

Total number of cells.

Definition at line 147 of file refinementParameters.H.

◆ maxLocalCells()

label maxLocalCells ( ) const
inline

Per processor max number of cells.

Definition at line 153 of file refinementParameters.H.

◆ minRefineCells()

label minRefineCells ( ) const
inline

When to stop refining.

Definition at line 159 of file refinementParameters.H.

◆ curvature()

scalar curvature ( ) const
inline

Curvature.

Definition at line 165 of file refinementParameters.H.

◆ planarAngle()

scalar planarAngle ( ) const
inline

Angle when two intersections are considered to be planar.

Definition at line 171 of file refinementParameters.H.

◆ nBufferLayers()

label nBufferLayers ( ) const
inline

Number of layers between different refinement levels.

Definition at line 177 of file refinementParameters.H.

◆ locationsInMesh()

const pointField & locationsInMesh ( ) const
inline

Areas to keep.

Definition at line 183 of file refinementParameters.H.

Referenced by snappyRefineDriver::doRefine(), and snappyVoxelMeshDriver::doRefine().

Here is the caller graph for this function:

◆ zonesInMesh()

const wordList & zonesInMesh ( ) const
inline

Per area the zone name.

Definition at line 189 of file refinementParameters.H.

Referenced by snappyRefineDriver::doRefine().

Here is the caller graph for this function:

◆ locationsOutsideMesh()

const pointField & locationsOutsideMesh ( ) const
inline

Optional points which are checked to be outside the mesh.

Definition at line 195 of file refinementParameters.H.

Referenced by snappyRefineDriver::doRefine(), and snappyVoxelMeshDriver::doRefine().

Here is the caller graph for this function:

◆ useLeakClosure()

bool useLeakClosure ( ) const
inline

Whether to attempt to close any 'leak' between.

locationsInsideMesh and locationsOutsideMesh. Default is false (dump path and exit with error) (see also refinementSurfaces::leakLevel to force surfaces to be checked for leaks early-on in the refinement)

Definition at line 205 of file refinementParameters.H.

◆ allowFreeStandingZoneFaces()

bool allowFreeStandingZoneFaces ( ) const
inline

Are zone faces allowed only inbetween different cell zones.

or also just free standing?

Definition at line 212 of file refinementParameters.H.

◆ useTopologicalSnapDetection()

bool useTopologicalSnapDetection ( ) const
inline

Use old topology based problem-cell removal.

(cells with 8 points on surface)

Definition at line 219 of file refinementParameters.H.

◆ maxLoadUnbalance()

scalar maxLoadUnbalance ( ) const
inline

Allowed load unbalance.

Definition at line 225 of file refinementParameters.H.

◆ handleSnapProblems()

bool handleSnapProblems ( ) const
inline

Definition at line 230 of file refinementParameters.H.

◆ interfaceRefine()

bool interfaceRefine ( ) const
inline

Refine cell with opposite faces with different refinement level.

Definition at line 236 of file refinementParameters.H.

◆ nErodeCellZone()

label nErodeCellZone ( ) const
inline

Number of iterations of erosion to get a consistent cellZone.

Definition at line 242 of file refinementParameters.H.

◆ nFilterIter()

label nFilterIter ( ) const
inline

Number of iterations of infill/erosion to get a smoother.

blockage

Definition at line 249 of file refinementParameters.H.

◆ minCellFraction()

scalar minCellFraction ( ) const
inline

When are disconnected regions small. Fraction of overall size.

of a zone or background. Default 0.

Definition at line 256 of file refinementParameters.H.

Referenced by snappyRefineDriver::doRefine().

Here is the caller graph for this function:

◆ nMinCells()

label nMinCells ( ) const
inline

When are disconnected regions small. Absolute number of cells.

in a zone or background. Default 0.

Definition at line 263 of file refinementParameters.H.

Referenced by snappyRefineDriver::doRefine().

Here is the caller graph for this function:

◆ getZoneInfo()

Foam::dictionary getZoneInfo ( const word fzName,
surfaceZonesInfo::faceZoneType faceType 
) const

Get patchInfo and faceType for faceZone.

Definition at line 160 of file refinementParameters.C.

References dictionary::add(), surfaceZonesInfo::faceZoneTypeNames, dictionary::found(), surfaceZonesInfo::INTERNAL, dictionary::readIfPresent(), dictionary::subDict(), and ensightPTraits< Type >::typeName.

Referenced by snappyRefineDriver::addFaceZones().

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

◆ addCellZonesToMesh()

Foam::labelList addCellZonesToMesh ( polyMesh mesh) const

Add cellZones to mesh. Return indices of cellZones (or -1)

Definition at line 189 of file refinementParameters.C.

References surfaceZonesInfo::addCellZone(), forAll, mesh, and zoneIDs.

Here is the call graph for this function:

◆ findCells()

Foam::labelList findCells ( const bool  checkInsideMesh,
const polyMesh mesh,
const pointField locations 
)
static

Checks that cells are in mesh. Returns cells (or -1) they.

are in.

Definition at line 211 of file refinementParameters.C.

References polyMesh::bounds(), Foam::endl(), Foam::exit(), polyMesh::FACE_DIAG_TRIS, Foam::FatalError, FatalErrorInFunction, polyMesh::findCell(), forAll, Foam::Info, globalIndex::isLocal(), mesh, primitiveMesh::nCells(), Foam::nl, Foam::reduce(), UList< T >::size(), polyMesh::tetBasePtIs(), globalIndex::toGlobal(), and globalIndex::toLocal().

Referenced by snappyRefineDriver::doRefine().

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

◆ zonedLocations()

Foam::labelList zonedLocations ( const wordList zonesInMesh)
static

Extract indices of named locations (so excludes 'keepPoints')

Definition at line 271 of file refinementParameters.C.

References DynamicList< T, SizeMin >::append(), forAll, and UList< T >::size().

Here is the call graph for this function:

◆ unzonedLocations()

Foam::labelList unzonedLocations ( const wordList zonesInMesh)
static

Extract indices of unnamed locations ('keepPoints')

Definition at line 293 of file refinementParameters.C.

References DynamicList< T, SizeMin >::append(), and forAll.

Here is the call graph for this function:

◆ zonePoints()

Foam::List< Foam::pointField > zonePoints ( const pointField locationsInMesh,
const wordList zonesInMesh,
const pointField locationsOutsideMesh 
)
static

Helper: per zone (entry in zonesInMesh) the locations with.

additionally locationsOutsideMesh as last. Used in hole filling

Definition at line 315 of file refinementParameters.C.

References DynamicList< T, SizeMin >::append(), UList< T >::find(), forAll, Foam::name(), DynamicList< T, SizeMin >::shrink(), and UList< T >::size().

Referenced by meshRefinement::blockLeakFaces().

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

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