47 #ifndef Foam_meshRefinement_H 48 #define Foam_meshRefinement_H 72 class mapDistributePolyMesh;
74 class decompositionMethod;
75 class refinementSurfaces;
76 class refinementFeatures;
79 class fvMeshDistribute;
81 class localPointRegion;
162 const scalar mergeDistance_;
165 const bool overwrite_;
168 const word oldInstance_;
219 template<
class GeoField>
220 static void addPatchFields(
fvMesh&,
const word& patchFieldType);
223 template<
class GeoField>
236 label globalFaceCount(
const labelList& elems)
const;
243 void calcCellCellRays
262 const label exposedPatchi
271 static bool markForRefine
273 const label markValue,
274 const label nAllowRefine,
281 void markFeatureCellLevel
289 label markFeatureRefinement
292 const label nAllowRefine,
299 label markInternalDistanceToFeatureRefinement
301 const label nAllowRefine,
307 label markInternalRefinement
309 const label nAllowRefine,
316 label unmarkInternalRefinement
330 label markSurfaceRefinement
332 const label nAllowRefine,
341 void collectGapCandidates
354 const scalar planarCos,
367 const label nAllowRefine,
378 label markSurfaceGapRefinement
380 const scalar planarCos,
381 const label nAllowRefine,
392 const point& nearPoint,
407 const bool useSurfaceNormal,
409 const point& nearPoint,
428 void selectGapCandidates
452 label markInternalGapRefinement
454 const scalar planarCos,
455 const bool spreadGapSize,
456 const label nAllowRefine,
464 label markSmallFeatureRefinement
466 const scalar planarCos,
467 const label nAllowRefine,
478 label markSurfaceFieldRefinement
480 const label nAllowRefine,
493 const scalar tol = 1
e-6
500 const scalar minCosAngle,
501 const scalar lengthScale,
511 label markSurfaceCurvatureRefinement
513 const scalar curvature,
514 const label nAllowRefine,
524 const scalar planarCos,
525 const label nAllowRefine,
527 const label surfaceLevel,
529 const vector& surfaceNormal,
542 label markProximityRefinement
544 const scalar curvature,
550 const label nAllowRefine,
559 label markProximityRefinementWave
561 const scalar planarCos,
563 const label nAllowRefine,
577 const bool allowBoundary,
584 void getIntersections
597 void getIntersections
608 void getBafflePatches
610 const label nErodeCellZones,
615 const bool exitIfLeakPath,
627 const label nBufferLayers,
641 const label ownPatch,
642 const label neiPatch,
661 void markBoundaryFace
688 const scalar minFaceArea,
689 const scalar maxNonOrtho,
696 const scalar volFraction,
703 void markFacesOnProblemCells
706 const bool removeEdgeConnectedCells,
719 const bitSet& isBlockedFace,
747 const label defaultRegion
752 void markFacesOnProblemCellsGeometric
771 const scalar freeStandingAngle
781 void findCellZoneGeometric
792 void findCellZoneInsideWalk
802 void findCellZoneInsideWalk
811 bool calcRegionToZone
813 const label backgroundZoneID,
814 const label surfZoneI,
815 const label ownRegion,
816 const label neiRegion,
825 void findCellZoneTopo
827 const label backgroundZoneID,
839 const label nErodeCellZones,
840 const label backgroundZoneID,
850 const label nGrowCellZones,
851 const label backgroundZoneID,
860 void makeConsistentFaceIndex
870 const bool allowFreeStandingZoneFaces,
871 const label nErodeCellZones,
872 const label backgroundZoneID,
876 const bool exitIfLeakPath,
890 const bitSet& isMasterFace,
894 const bitSet& meshFlipMap,
899 void allocateInterRegionFaceZone
908 void handleSnapProblems
911 const bool useTopologicalSnapDetection,
912 const bool removeEdgeConnectedCells,
934 void calcPatchNumMasterFaces
936 const bitSet& isMasterFace,
951 void consistentOrientation
953 const bitSet& isMasterFace,
1007 return mergeDistance_;
1019 return oldInstance_;
1023 const refinementSurfaces&
surfaces()
const 1029 const refinementFeatures&
features()
const 1035 const shellSurfaces&
shells()
const 1043 return limitShells_;
1061 return faceToCoupledPatch_;
1068 const List<Tuple2<mapType, labelList>>&
userFaceData()
const 1070 return userFaceData_;
1075 return userFaceData_;
1088 autoPtr<mapDistributePolyMesh>
balance 1090 const bool keepZoneFaces,
1091 const bool keepBaffles,
1093 decompositionMethod& decomposer,
1094 fvMeshDistribute& distributor
1104 static autoPtr<indirectPrimitivePatch>
makePatch 1118 const pointMesh& pMesh,
1128 const polyMesh&
mesh,
1129 const bitSet& isMasterEdge,
1138 template<
class Type>
1141 const polyMesh&
mesh,
1142 const bitSet& isMasterEdge,
1146 const Field<Type>& data,
1166 const scalar planarCos,
1179 const scalar curvature,
1180 const scalar planarAngle,
1182 const bool featureRefinement,
1183 const bool featureDistanceRefinement,
1184 const bool internalRefinement,
1185 const bool surfaceRefinement,
1186 const bool curvatureRefinement,
1187 const bool smallFeatureRefinement,
1188 const bool gapRefinement,
1189 const bool bigGapRefinement,
1190 const bool spreadGapSize,
1191 const label maxGlobalCells,
1192 const label maxLocalCells
1211 const bitSet& isOutsideFace,
1219 const bitSet& isOutsideFace,
1227 const scalar planarAngle,
1230 const label growIter
1284 const scalar maxLoadUnbalance,
1285 const label maxCellUnbalance
1295 const scalar maxLoadUnbalance,
1296 const label maxCellUnbalance
1306 const scalar maxLoadUnbalance,
1307 const label maxCellUnbalance
1313 const label maxGlobalCells,
1314 const label maxLocalCells,
1333 const bool handleSnapProblems,
1337 const bool useTopologicalSnapDetection,
1338 const bool removeEdgeConnectedCells,
1340 const label nErodeCellZones,
1348 const bool exitIfLeakPath,
1357 const bool useTopologicalSnapDetection,
1358 const bool removeEdgeConnectedCells,
1360 const scalar planarAngle,
1373 const label nBufferLayers,
1374 const label nErodeCellZones,
1381 const bool exitIfLeakPath,
1389 const label nBufferLayers,
1390 const label nErodeCellZones,
1469 const bool doInternalZones,
1470 const bool doBaffleZones
1480 const bool allowFreeStandingZoneFaces,
1481 const label nErodeCellZones,
1485 const bool exitIfLeakPath,
1498 const label insertPatchi,
1518 const word& masterPatch,
1519 const word& slavePatch,
1528 label& masterPatchID,
1529 label& slavePatchID,
1546 void nearestIntersection
1573 const vector& perturbVec,
1582 const vector& perturbVec,
1591 const vector& perturbVec,
1594 const label nRegions,
1598 const bool exitIfLeakPath,
1611 const bool exitIfLeakPath,
1684 const scalar minCos,
1685 const scalar concaveCos,
1686 const label mergeSize,
1695 const scalar minCos,
1696 const scalar concaveCos,
1737 const scalar minCos,
1800 const bool printCellLevel
1834 const bitSet& isMasterElem,
1848 template<
class EnumContainer>
1851 const EnumContainer& namedEnum,
1856 template<
class Type>
1860 const word& keyword,
1863 const Type& deflt =
Zero 1870 const word& keyword,
1879 const word& keyword,
const labelList patchIDs(pbm.indices(polyPatchNames, true))
label addFaceZone(const word &fzName, const word &masterPatch, const word &slavePatch, const surfaceZonesInfo::faceZoneType &fzType)
Add/lookup faceZone and update information. Return index of.
void markOutsideFaces(const labelList &cellLevel, const labelList &neiLevel, const labelList &refineCell, bitSet &isOutsideFace) const
Mark faces on interface between set and rest.
const refinementSurfaces & surfaces() const
Reference to surface search engines.
const labelIOList & zoneIDs
static const dictionary & subDict(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
Wrapper around dictionary::subDict which does not exit.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
A class for handling file names.
const List< Tuple2< mapType, labelList > > & userFaceData() const
Additional face data that is maintained across.
label addPointZone(const word &name)
Add pointZone if does not exist. Return index of zone.
autoPtr< mapPolyMesh > mergePoints(const labelList &pointToDuplicate)
Merge duplicate points.
autoPtr< mapDistributePolyMesh > refineAndBalance(const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance, const label maxCellUnbalance)
Refine some cells and rebalance.
label mergePatchFacesUndo(const scalar minCos, const scalar concaveCos, const labelList &patchIDs, const dictionary &motionDict, const labelList &preserveFaces, const meshRefinement::FaceMergeType mergeType)
Merge coplanar faces. preserveFaces is != -1 for faces.
const word & oldInstance() const
(points)instance of mesh upon construction
label mergePatchFaces(const scalar minCos, const scalar concaveCos, const label mergeSize, const labelList &patchIDs, const meshRefinement::FaceMergeType mergeType)
Merge coplanar faces if sets are of size mergeSize.
label countHits() const
Count number of intersections (local)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static void removeFiles(const polyMesh &)
Helper: remove all relevant files from mesh instance.
labelList growFaceCellFace(const labelUList &set) const
List< edge > edgeList
List of edge.
bool getFaceZoneInfo(const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const
Lookup faceZone information. Return false if no information.
static label findRegions(const polyMesh &, const vector &perturbVec, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const label nRegions, labelList &cellRegion, const boolList &blockedFace, const bool exitIfLeakPath, const refPtr< coordSetWriter > &leakPathFormatter)
Find regions points are in.
bool overwrite() const
Overwrite the mesh?
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool isNormalGap(const scalar planarCos, const label level0, const vector &point0, const vector &normal0, const label level1, const vector &point1, const vector &normal1) const
Is local topology a small gap normal to the test vector.
static label findRegion(const polyMesh &, const labelList &cellRegion, const vector &perturbVec, const point &p)
Find region point is in. Uses optional perturbation to re-test.
void printMeshInfo(const bool debug, const string &msg, const bool printCellLevel) const
Print some mesh stats.
autoPtr< mapPolyMesh > doRemoveCells(const labelList &cellsToRemove, const labelList &exposedFaces, const labelList &exposedPatchIDs, removeCells &cellRemover)
Remove cells. Put exposedFaces into exposedPatchIDs.
static ITstream & lookup(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
Wrapper around dictionary::lookup which does not exit.
label splitFacesUndo(const labelList &splitFaces, const labelPairList &splits, const dictionary &motionDict, labelList &duplicateFace, List< labelPair > &baffles)
Split faces along diagonal. Maintain mesh quality. Return.
const shellSurfaces & shells() const
Reference to refinement shells (regions)
autoPtr< mapPolyMesh > removeGapCells(const scalar planarAngle, const labelList &minSurfaceLevel, const labelList &globalToMasterPatch, const label growIter)
Detect gapRefinement cells and remove them.
Given list of cells to remove, insert all the topology changes.
autoPtr< mapPolyMesh > createBaffles(const labelList &ownPatch, const labelList &neiPatch)
Create baffle for every internal face where ownPatch != -1.
labelList intersectedFaces() const
Get faces with intersection.
static writeType writeLevel()
Get/set write level.
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 ®ionsInMesh, const pointField &locationsOutsideMesh, const bool exitIfLeakPath, const refPtr< coordSetWriter > &leakPathFormatter, refPtr< surfaceWriter > &surfFormatter)
Split off unreachable areas of mesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
label countFaceDirs(const bitSet &isOutsideFace, const label celli) const
Count number of faces on cell that are in set.
Forwards and collection of common point field types.
static bitSet getMasterEdges(const polyMesh &mesh, const labelList &meshEdges)
Determine master edge for subset of edges. If coupled.
labelList getZones(const List< surfaceZonesInfo::faceZoneType > &fzTypes) const
Get zones of given type.
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
Calculate list of cells to refine.
static List< labelPair > subsetBaffles(const polyMesh &mesh, const labelList &zoneIDs, const List< labelPair > &baffles)
Subset baffles according to zones.
set value to -1 any face that was refined
static void calculateEdgeWeights(const polyMesh &mesh, const bitSet &isMasterEdge, const labelList &meshPoints, const edgeList &edges, scalarField &edgeWeights, scalarField &invSumWeight)
Helper: calculate edge weights (1/length)
An enumeration wrapper for classification of a location as being inside/outside of a volume...
labelList intersectedPoints() const
Get points on surfaces with intersection and boundary faces.
autoPtr< mapPolyMesh > directionalRefine(const string &msg, const direction cmpt, const labelList &cellsToRefine)
Directionally refine in direction cmpt.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for managing references or pointers (no reference counting)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
labelList collectFaces(const labelList &candidateFaces, const labelHashSet &set) const
Takes mesh with 'baffles' (= boundary faces sharing points). Determines for selected points on bounda...
const fvMesh & mesh() const
Reference to mesh.
Container for data on surfaces used for surface-driven refinement. Contains all the data about the le...
static label addPatch(fvMesh &, const word &name, const dictionary &)
Helper:add patch to mesh. Update all registered fields.
label mergeEdgesUndo(const scalar minCos, const dictionary &motionDict)
Merge edges, maintain mesh quality. Return global number.
static const Enum< writeType > writeTypeNames
Encapsulates queries for features.
static label appendPatch(fvMesh &, const label insertPatchi, const word &, const dictionary &)
Helper:append patch to end of mesh.
void doSplitFaces(const labelList &splitFaces, const labelPairList &splits, polyTopoChange &meshMod) const
Split faces into two.
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)
Merge free-standing baffles.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
A list of faces which address into the list of points.
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
FaceMergeType
Enumeration for what to do with co-planar patch faces on a single.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
ClassName("meshRefinement")
Runtime type information.
Refinement of (split) hexes using polyTopoChange.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Simple container to keep together snap specific information.
autoPtr< mapPolyMesh > removeLeakCells(const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const labelList &selectedSurfaces)
Remove minimum amount of cells to break any leak from.
autoPtr< mapPolyMesh > blockLeakFaces(const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList &zonesInMesh, const pointField &locationsOutsideMesh, const labelList &selectedSurfaces)
Baffle faces to break any leak from inside to outside.
autoPtr< mapPolyMesh > mergeZoneBaffles(const bool doInternalZones, const bool doBaffleZones)
Merge all baffles on faceZones.
Base class for writing coordSet(s) and tracks with fields.
static void checkCoupledFaceZones(const polyMesh &)
Helper function: check that face zones are synced.
void testSyncBoundaryFaceList(const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const
Compare two lists over all boundary faces.
void growSet(const labelList &neiLevel, const bitSet &isOutsideFace, labelList &refineCell, label &nRefine) const
Add one layer of cells to set.
const labelList & surfaceIndex() const
Per start-end edge the index of the surface hit.
autoPtr< mapPolyMesh > removeLimitShells(const label nBufferLayers, const label nErodeCellZones, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList ®ionsInMesh, const pointField &locationsOutsideMesh)
Remove cells from limitRegions if level -1.
Abstract base class for domain decomposition.
Encapsulates queries for volume refinement ('refine all cells within shell').
autoPtr< mapDistributePolyMesh > balance(const bool keepZoneFaces, const bool keepBaffles, const scalarField &cellWeights, decompositionMethod &decomposer, fvMeshDistribute &distributor)
Redecompose according to cell count.
Container with cells to refine. Refinement given as single direction.
A HashTable similar to std::unordered_map.
autoPtr< mapPolyMesh > doRemovePoints(removePoints &pointRemover, const boolList &pointCanBeDeleted)
labelList directionalRefineCandidates(const label maxGlobalCells, const label maxLocalCells, const labelList ¤tLevel, const direction dir) const
Calculate list of cells to directionally refine.
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
const refinementFeatures & features() const
Reference to feature edge mesh.
word timeName() const
Replacement for Time::timeName() that returns oldInstance (if overwrite_)
mapType
Enumeration for how userdata is to be mapped upon refinement.
const hexRef8 & meshCutter() const
Reference to meshcutting engine.
static int readFlags(const EnumContainer &namedEnum, const wordList &words)
Helper: convert wordList into bit pattern using provided Enum.
autoPtr< mapDistributePolyMesh > balanceAndRefine(const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance, const label maxCellUnbalance)
Balance before refining some cells.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void checkData()
Debugging: check that all faces still obey start()>end()
int debug
Static debugging option.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
const Map< label > & faceToCoupledPatch() const
For faces originating from processor faces store the original.
label addMeshedPatch(const word &name, const dictionary &)
Add patch originating from meshing. Update meshedPatches_.
labelList meshedPatches() const
Get patchIDs for patches added in addMeshedPatch.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
autoPtr< mapPolyMesh > doRestorePoints(removePoints &pointRemover, const labelList &facesToRestore)
static autoPtr< indirectPrimitivePatch > makePatch(const polyMesh &, const labelList &)
Create patch from set of patches.
void updateMesh(const mapPolyMesh &, const labelList &changedFaces)
Update for external change to mesh. changedFaces are in new mesh.
void updateIntersections(const labelList &changedFaces)
Find any intersection of surface. Store in surfaceIndex_.
scalar mergeDistance() const
autoPtr< mapPolyMesh > splitMeshRegions(const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const bool exitIfLeakPath, const refPtr< coordSetWriter > &leakPathFormatter)
Split mesh. Keep part containing point. Return empty map if.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
autoPtr< mapPolyMesh > createZoneBaffles(const labelList &zoneIDs, List< labelPair > &baffles, labelList &originatingFaceZone)
Create baffles for faces on faceZones. Return created baffles.
autoPtr< mapPolyMesh > refine(const labelList &cellsToRefine)
Refine some cells.
void setInstance(const fileName &)
Set instance of all local IOobjects.
static void collectAndPrint(const UList< point > &points, const UList< T > &data)
Print list according to (collected and) sorted coordinate.
autoPtr< mapPolyMesh > dupNonManifoldPoints()
Find boundary points that connect to more than one cell.
void storeData(const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
Signal points/face/cells for which to store data.
autoPtr< mapPolyMesh > dupNonManifoldBoundaryPoints()
Find boundary points that are on faceZones of type boundary.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
static void testSyncPointList(const string &msg, const polyMesh &mesh, const List< scalar > &fld)
have slaves (upon refinement) from master
const shellSurfaces & limitShells() const
Reference to limit shells (regions)
static bitSet getMasterPoints(const polyMesh &mesh, const labelList &meshPoints)
Determine master point for subset of points. If coupled.
Mesh data needed to do the Finite Volume discretisation.
Direct mesh changes based on v1.3 polyTopoChange syntax.
void getZoneFaces(const labelList &zoneIDs, labelList &faceZoneID, labelList &ownPatch, labelList &neiPatch, labelList &nBaffles) const
Get per-face information (faceZone, master/slave patch)
option
Enumeration for the data type and search/match modes (bitmask)
const std::string patch
OpenFOAM patch number as a std::string.
void selectIntersectedFaces(const labelList &surfaces, boolList &isBlockedFace) const
Faces currently on boundary or intersected by surface.
autoPtr< mapPolyMesh > mergeBaffles(const List< labelPair > &, const Map< label > &faceToPatch)
Merge baffles. Gets pairs of faces and boundary faces to move.
static const Enum< debugType > debugTypeNames
void selectSeparatedCoupledFaces(boolList &) const
Select coupled faces that are not collocated.
writeType
Enumeration for what to write. Used as a bit-pattern.
faceZoneType
What to do with faceZone faces.
debugType
Enumeration for what to debug. Used as a bit-pattern.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Removes selected points from mesh and updates faces using these points.
Mesh consisting of general polyhedral cells.
bool isGap(const scalar, const vector &, const vector &, const vector &, const vector &) const
Is local topology a small gap?
A subset of mesh faces organised as a primitive patch.
Contains information about location on a triSurface.
bool write() const
Write mesh and all data.
List< label > labelList
A List of labels.
static tmp< pointVectorField > makeDisplacementField(const pointMesh &pMesh, const labelList &adaptPatchIDs)
Helper function to make a pointVectorField with correct.
static T gAverage(const bitSet &isMasterElem, const UList< T > &values)
Helper: calculate average.
void dumpIntersections(const fileName &prefix) const
Debug: Write intersection information to OBJ format.
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)
Helper: weighted sum (over all subset of mesh points) by.
labelList detectLeakCells(const boolList &isBlockedFace, const labelList &leakFaces, const labelList &seedCells) const
Return list of cells to block by walking from the seedCells.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
void dumpRefinementLevel() const
Write refinement level as volScalarFields for postprocessing.
labelList countEdgeFaces(const uindirectPrimitivePatch &pp) const
Count number of faces per patch edge. Parallel consistent.
const volScalarField & p0
An input stream of tokens.
static label findCell(const polyMesh &, const vector &perturbVec, const point &p)
Find cell point is in. Uses optional perturbation to re-test.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)