38#ifndef refinementParameters_H
39#define refinementParameters_H
59class refinementParameters
64 const label maxGlobalCells_;
67 const label maxLocalCells_;
70 const label minRefineCells_;
76 const scalar planarAngle_;
79 const label nBufferLayers_;
91 const bool useLeakClosure_;
102 const Switch allowFreeStandingZoneFaces_;
106 const Switch useTopologicalSnapDetection_;
109 const scalar maxLoadUnbalance_;
112 const label maxCellUnbalance_;
114 const Switch handleSnapProblems_;
116 const Switch interfaceRefine_;
118 const label nErodeCellZone_;
120 const label nFilterIter_;
122 const scalar minCellFraction_;
124 const label nMinCells_;
127 const bool balanceAtEnd_;
135 refinementParameters(
const refinementParameters&) =
delete;
138 void operator=(
const refinementParameters&) =
delete;
146 refinementParameters(
const dictionary&
dict,
const bool dryRun =
false);
156 return maxGlobalCells_;
162 return maxLocalCells_;
168 return minRefineCells_;
186 return nBufferLayers_;
192 return locationsInMesh_;
204 return locationsOutsideMesh_;
214 return useLeakClosure_;
221 return allowFreeStandingZoneFaces_;
228 return useTopologicalSnapDetection_;
234 return maxLoadUnbalance_;
240 return maxCellUnbalance_;
245 return handleSnapProblems_;
251 return interfaceRefine_;
257 return nErodeCellZone_;
271 return minCellFraction_;
284 return balanceAtEnd_;
304 const bool checkInsideMesh,
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh consisting of general polyhedral cells.
scalar planarAngle() const
Angle when two intersections are considered to be planar.
label maxLocalCells() const
Per processor max number of cells.
bool useLeakClosure() const
Whether to attempt to close any 'leak' between.
scalar curvature() const
Curvature.
scalar minCellFraction() const
When are disconnected regions small. Fraction of overall size.
static labelList unzonedLocations(const wordList &zonesInMesh)
Extract indices of unnamed locations ('keepPoints').
labelList addCellZonesToMesh(polyMesh &) const
Add cellZones to mesh. Return indices of cellZones (or -1).
label minRefineCells() const
When to stop refining.
static labelList zonedLocations(const wordList &zonesInMesh)
Extract indices of named locations (so excludes 'keepPoints').
bool useTopologicalSnapDetection() const
Use old topology based problem-cell removal.
label nMinCells() const
When are disconnected regions small. Absolute number of cells.
const pointField & locationsOutsideMesh() const
Optional points which are checked to be outside the mesh.
static labelList findCells(const bool checkInsideMesh, const polyMesh &, const pointField &locations)
Checks that cells are in mesh. Returns cells (or -1) they.
const pointField & locationsInMesh() const
Areas to keep.
static List< pointField > zonePoints(const pointField &locationsInMesh, const wordList &zonesInMesh, const pointField &locationsOutsideMesh)
Helper: per zone (entry in zonesInMesh) the locations with.
dictionary getZoneInfo(const word &fzName, surfaceZonesInfo::faceZoneType &faceType) const
Get patchInfo and faceType for faceZone.
label maxCellUnbalance() const
Trigger cell count to start balancing.
scalar maxLoadUnbalance() const
Allowed load unbalance.
bool allowFreeStandingZoneFaces() const
Are zone faces allowed only inbetween different cell zones.
label maxGlobalCells() const
Total number of cells.
bool handleSnapProblems() const
label nBufferLayers() const
Number of layers between different refinement levels.
const wordList & zonesInMesh() const
Per area the zone name.
label nErodeCellZone() const
Number of iterations of erosion to get a consistent cellZone.
bool balanceAtEnd() const
Force final balancing after castallation.
bool interfaceRefine() const
Refine cell with opposite faces with different refinement level.
label nFilterIter() const
Number of iterations of infill/erosion to get a smoother.
faceZoneType
What to do with faceZone faces.
A class for handling words, derived from Foam::string.
List< word > wordList
List of word.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.