189 isOutsideFace.
setSize(mesh_.nFaces());
190 isOutsideFace =
Zero;
192 forAll(mesh_.faceNeighbour(), facei)
194 label own = mesh_.faceOwner()[facei];
195 label nei = mesh_.faceNeighbour()[facei];
198 (cellLevel[own] == cellLevel[nei])
205 isOutsideFace.
set(facei);
210 const label nBnd = mesh_.nBoundaryFaces();
214 for (label bFacei = 0; bFacei < nBnd; ++bFacei)
216 label facei = mesh_.nInternalFaces()+bFacei;
217 label own = mesh_.faceOwner()[facei];
221 (cellLevel[own] == neiLevel[bFacei])
224 != (neiRefineCell[bFacei] != -1)
237 const bitSet& isOutsideFace,
241 const cell& cFaces = mesh_.cells()[celli];
248 const label facei = cFaces[cFacei];
250 if (isOutsideFace[facei])
252 const vector&
n = faceAreas[facei];
255 if (magSqrN > ROOTVSMALL)
260 dir < pTraits<vector>::nComponents;
266 haveDirs[dir] =
true;
289 const bitSet& isOutsideFace,
300 if (countFaceDirs(isOutsideFace, celli) == 3)
458void Foam::meshRefinement::markProximityCandidateFaces
471 for (
const label surfi : blockedSurfaces)
473 const label geomi = surfaces_.surfaces()[surfi];
479 boolList isOpenEdge(edFaces.size(),
false);
482 if (edFaces[i].size() == 1)
484 isOpenEdge[i] =
true;
489 const label nZones = surf.markZones(isOpenEdge,
faceZone);
492 faceZones[surfi].transfer(
faceZone);
502 const label nIters = mesh_.globalData().nTotalCells();
545 surfaces_.findNearestIntersection
613 const label facei = testFaces[i];
615 const point& fc = mesh_.faceCentres()[facei];
616 const labelList& fz1 = faceZones[surface1[i]];
618 originLocation.clear();
619 originDistSqr.clear();
621 originSurface.clear();
623 originLocation.append(hit1[i].
point());
624 originDistSqr.append(hit1[i].
point().distSqr(fc));
632 (fz1.size() ? fz1[hit1[i].index()] : region1[i])
636 if (hit2[i].hit() && hit1[i] != hit2[i])
638 const labelList& fz2 = faceZones[surface2[i]];
639 originLocation.append(hit2[i].
point());
640 originDistSqr.append(hit2[i].
point().distSqr(fc));
648 (fz2.size() ? fz2[hit2[i].index()] : region2[i])
662 changedFaces[
n] = facei;
703 bitSet isProximityFace(mesh_.nFaces(),
false);
706 isProximityFace.set(testFaces);
712 isProximityFace.set(mesh_.cells()[celli]);
724 testFaces = isProximityFace.toc();
728Foam::label Foam::meshRefinement::markFakeGapRefinement
730 const scalar planarCos,
732 const label nAllowRefine,
743 scalar maxBlockSize(-1);
744 for (
const label surfi : blockedSurfaces)
746 const label geomi = surfaces_.surfaces()[surfi];
750 regionToBlockSize[surfi].setSize(nRegions, -1);
751 for (label regioni = 0; regioni < nRegions; regioni++)
753 const label globalRegioni = surfaces_.globalRegion(surfi, regioni);
754 const label bLevel = surfaces_.blockLevel()[globalRegioni];
759 regionToBlockSize[surfi][regioni] =
760 meshCutter_.level0EdgeLength()/
pow(2.0, bLevel);
763 maxBlockSize =
max(maxBlockSize, regionToBlockSize[surfi][regioni]);
783 markProximityCandidateFaces
793 bitSet isTestCell(mesh_.nCells());
794 for (
const label facei : testFaces)
796 const label own = mesh_.faceOwner()[facei];
801 if (mesh_.isInternalFace(facei))
803 const label nei = mesh_.faceNeighbour()[facei];
810 cellMap = isTestCell.sortedToc();
827 surfaces_.findNearestRegion
849 label nTestCells = 0;
853 if (nearInfo[i].hit())
855 const label globalRegioni = surfaces_.globalRegion
862 const label bLevel = surfaces_.blockLevel()[globalRegioni];
872 const label celli = cellMap[i];
873 const label cLevel = meshCutter_.cellLevel()[celli];
876 const label nRays = generateRays
879 nearInfo[i].hitPoint(),
884 mesh_.cellCentres()[celli],
898 for (label j = 0; j < nRays; j++)
907 <<
" cells for testing out of "
908 << mesh_.globalData().nTotalCells() <<
endl;
930 surfaces_.findNearestIntersection
944 surfaces_.findNearestIntersection
958 if (surf1[i] != -1 && surf2[i] != -1)
964 const label celli = cellMap[i];
967 const scalar d2 =
magSqr(hit1[i].hitPoint()-hit2[i].hitPoint());
969 const scalar maxGapSize
973 regionToBlockSize[surf1[i]][region1[i]],
974 regionToBlockSize[surf2[i]][region2[i]]
980 (
mag(normal1[i]&normal2[i]) > planarCos)
997 Pout<<
"Stopped refining since reaching my cell"
998 <<
" limit of " << mesh_.nCells()+7*nRefine
1014 Info<<
"Reached refinement limit." <<
endl;
1023 const scalar planarAngle,
1026 const label growIter
1030 labelList neiLevel(mesh_.nBoundaryFaces());
1032 calcNeighbourData(neiLevel, neiCc);
1055 forAll(surfaces_.surfaces(), surfi)
1057 const label geomi = surfaces_.surfaces()[surfi];
1059 const label nRegions =
s.regions().size();
1062 for (label regioni = 0; regioni < nRegions; regioni++)
1064 const label globalRegioni = surfaces_.globalRegion(surfi, regioni);
1068 surfaces_.blockLevel()[globalRegioni]
1074 surfToBlockLevel.
insert(surfi, minBlockLevel);
1092 markFakeGapRefinement
1106 Info<<
"Marked for blocking due to close opposite surfaces : "
1116 for (label iter = 0; iter < growIter; iter++)
1121 meshCutter_.cellLevel(),
1127 growSet(neiLevel, isOutsideFace,
refineCell, nRefine);
1132 for (label iter = 0; iter < growIter; iter++)
1144 for (label celli = 0; celli < mesh_.nCells(); celli++)
1146 if (
refineCell[celli] != -1 && oldRefineCell[celli] == -1)
1148 if (countFaceDirs(isOutsideFace, celli) >= 3)
1157 Info<<
"Marked for blocking after filtering : "
1165 const label defaultRegion(surfaces_.globalRegion(unnamedSurfaces[0], 0));
1184 cellsToRemove[nRefine++] = cellI;
1190 labelList exposedFaces(cellRemover.getExposedFaces(cellsToRemove));
1192 labelList exposedPatches(exposedFaces.size());
1195 label facei = exposedFaces[i];
1196 exposedPatches[i] = globalToMasterPatch[nearestRegion[facei]];
1199 return doRemoveCells
1226 boolList isSelectedSurf(surfaces_.surfaces().size(),
false);
1229 forAll(surfaceIndex_, facei)
1231 const label surfi = surfaceIndex_[facei];
1232 if (surfi != -1 && isSelectedSurf[surfi])
1913 forAll(locationsInMesh, i)
1921 if (insideCells[i] != -1)
1923 insideRegions[i] = cellRegion[insideCells[i]];
1927 if (insideRegions[i] == -1)
1936 if (insideCells[i] != -1)
1938 insideRegions[i] = cellRegion[insideCells[i]];
1942 if (insideRegions[i] == -1)
1945 <<
"Cannot find locationInMesh " << locationsInMesh[i]
1955 bool haveLeak =
false;
1956 forAll(locationsOutsideMesh, i)
1964 locationsOutsideMesh[i]
1970 if (insideRegions.
find(regioni) != -1)
1974 <<
"Outside location " << locationsOutsideMesh[i]
1975 <<
" in region " << regioni
1976 <<
" is connected to one of the inside points "
1977 << locationsInMesh <<
endl;
1995 locationsOutsideMesh
2012 globalBlockingFaces,
2021 Pout<<
"meshRefinement::blockLeakFaces :"
2022 <<
" found closure faces:" << closureFaces.
size()
2023 <<
" map:" << bool(closureMapPtr) <<
endl;
2029 <<
"have leak but did not find any closure faces"
2041 for (label patchi = 0; patchi <
patches.nNonProcessor(); ++patchi)
2047 ownPatch[
pp.start()+i] = patchi;
2048 neiPatch[
pp.start()+i] = patchi;
2056 labelList faceToZone(mesh_.nFaces(), -1);
2057 boolList faceToFlip(mesh_.nFaces(),
false);
2060 const labelList& addressing = fzs[zonei];
2061 const boolList& flipMap = fzs[zonei].flipMap();
2065 faceToZone[addressing[i]] = zonei;
2066 faceToFlip[addressing[i]] = flipMap[i];
2073 closureMapPtr->distribute(packedOwnPatch);
2075 closureMapPtr->distribute(packedNeiPatch);
2077 closureMapPtr->distribute(packedZone);
2079 closureMapPtr->distribute(packedFlip);
2082 const label facei = closureFaces[i];
2083 const label sloti = closureToBlocked[i];
2088 ownPatch[facei] = packedOwnPatch[sloti];
2089 neiPatch[facei] = packedNeiPatch[sloti];
2090 faceToZone[facei] = packedZone[sloti];
2091 faceToFlip[facei] = packedFlip[sloti];
2103 forAll(faceToZone, facei)
2105 const label zonei = faceToZone[facei];
2108 zoneToFaces[zonei].
append(facei);
2109 zoneToFlip[zonei].
append(faceToFlip[facei]);
2113 forAll(zoneToFaces, zonei)
2137 bitSet isFrozenPoint(mesh_.nPoints());
2138 forAll(nEdgeFaces, edgei)
2140 if (nEdgeFaces[edgei] != 1)
2142 const edge&
e =
pp.edges()[edgei];
2143 isFrozenPoint.
set(
pp.meshPoints()[
e[0]]);
2144 isFrozenPoint.
set(
pp.meshPoints()[
e[1]]);
2152 const bitSet oldSet(mesh_.nPoints(), pointZones[zonei]);
2153 isFrozenPoint.
set(oldSet);
2165 pointZones[zonei] = isFrozenPoint.
sortedToc();
2197 const_cast<Time&
>(mesh_.time())++;
2199 Pout<<
"Writing current mesh to time "
2211 Pout<<
"Dumped mesh in = "
2212 << mesh_.time().cpuTimeIncrement() <<
" s\n" <<
nl <<
endl;
2284 //if (isA<triSurfaceMesh>(s) && !isA<distributedTriSurfaceMesh>(s))
2286 // const triSurfaceMesh& surf = refCast<const triSurfaceMesh>(s);
2289 //nIters = max(nIters, (2<<(mLevel-bLevel)));
2293 // Clever limiting of the number of iterations (= max cells in the channel)
2294 // since it has too many problematic issues, e.g. with volume refinement
2295 // and the real check uses the proper distance anyway just disable.
2296 const label nIters = mesh_.globalData().nTotalCells();
2299 // Collect candidate faces (i.e. intersecting any surface and
2300 // owner/neighbour not yet refined)
2301 const labelList testFaces(getRefineCandidateFaces(refineCell));
2304 pointField start(testFaces.size());
2305 pointField end(testFaces.size());
2306 labelList minLevel(testFaces.size());
2317 // TBD. correct nIters for actual cellLevel (since e.g. volume refinement
2318 // might add to cell level). Unfortunately we only have minLevel,
2319 // not maxLevel. Problem: what if volume refinement only in middle of
2320 // channel? Say channel 1m wide with a 0.1m sphere of refinement
2321 // Workaround: have dummy surface with e.g. maxLevel 100 to
2322 // force nIters to be high enough.
2325 // Test for all intersections (with surfaces of higher gap level than
2326 // minLevel) and cache per cell the max surface level and the local normal
2330 List<pointIndexHit> hit1;
2332 vectorField normal1;
2335 List<pointIndexHit> hit2;
2337 vectorField normal2;
2339 surfaces_.findNearestIntersection
2347 region1, // local region
2352 region2, // local region
2357 // Detect cells that are using multiple surface regions
2358 //bitSet isMultiRegion;
2359 //detectMultiRegionCells
2377 forAll(testFaces, i)
2385 List<wallPoints> faceDist(n);
2386 labelList changedFaces(n);
2389 DynamicList<point> originLocation(2);
2390 DynamicList<scalar> originDistSqr(2);
2391 DynamicList<FixedList<label, 3>> originSurface(2);
2392 //DynamicList<point> originNormal(2);
2395 //- To avoid walking through surfaces we mark all faces that have been
2396 // intersected. We can either mark only those faces intersecting
2397 // blockedSurfaces (i.e. with a 'blockLevel') or mark faces intersecting
2398 // any (refinement) surface (this includes e.g. faceZones). This is
2399 // much easier since that information is already cached
2400 // (meshRefinement::intersectedFaces())
2402 //bitSet isBlockedFace(mesh_.nFaces());
2403 forAll(testFaces, i)
2407 const label facei = testFaces[i];
2408 //isBlockedFace.set(facei);
2409 const point& fc = mesh_.faceCentres()[facei];
2410 const labelList& fz1 = faceZones[surface1[i]];
2412 originLocation.clear();
2413 originDistSqr.clear();
2414 //originNormal.clear();
2415 originSurface.clear();
2417 originLocation.append(hit1[i].point());
2418 originDistSqr.append(hit1[i].point().distSqr(fc));
2419 //originNormal.append(normal1[i]);
2420 originSurface.append
2426 (fz1.size() ? fz1[hit1[i].index()] : region1[i])
2430 if (hit2[i].hit() && hit1[i] != hit2[i])
2432 const labelList& fz2 = faceZones[surface2[i]];
2433 originLocation.append(hit2[i].point());
2434 originDistSqr.append(hit2[i].point().distSqr(fc));
2435 //originNormal.append(normal2[i]);
2436 originSurface.append
2442 (fz2.size() ? fz2[hit2[i].index()] : region2[i])
2447 // Collect all seed data. Currently walking does not look at
2448 // surface direction - if so pass in surface normal as well
2449 faceDist[n] = wallPoints
2451 originLocation, // origin
2452 originDistSqr, // distance to origin
2453 originSurface // surface+region+zone
2454 //originNormal // normal at origin
2456 changedFaces[n] = facei;
2462 // Clear intersection info
2473 List<wallPoints> allFaceInfo(mesh_.nFaces());
2474 List<wallPoints> allCellInfo(mesh_.nCells());
2476 // Any refinement surface (even a faceZone) should stop the gap walking.
2477 // This is exactly the information which is cached in the surfaceIndex_
2479 const bitSet isBlockedFace(intersectedFaces());
2481 wallPoints::trackData td(isBlockedFace, regionToBlockSize);
2482 FaceCellWave<wallPoints, wallPoints::trackData> wallDistCalc
2489 0, // max iterations
2492 wallDistCalc.iterate(nIters);
2495 if (debug&meshRefinement::MESH)
2497 // Dump current nearest opposite surfaces
2498 volScalarField distance
2503 mesh_.time().timeName(),
2507 IOobject::NO_REGISTER
2513 dimLength, //dimensionSet(0, 1, 0, 0, 0),
2518 forAll(allCellInfo, celli)
2520 if (allCellInfo[celli].valid(wallDistCalc.data()))
2522 const point& cc = mesh_.cellCentres()[celli];
2523 // Nearest surface points
2524 const List<point>& origin = allCellInfo[celli].origin();
2526 // Find 'opposite' pair with minimum distance
2527 for (label i = 0; i < origin.size(); i++)
2529 for (label j = i + 1; j < origin.size(); j++)
2531 if (((cc-origin[i]) & (cc-origin[j])) < 0)
2533 const scalar d(mag(origin[i]-origin[j]));
2534 if (distance[celli] < 0)
2536 distance[celli] = d;
2540 distance[celli] = min(distance[celli], d);
2547 distance.correctBoundaryConditions();
2549 Info<< "Writing measured gap distance to "
2550 << distance.name() << endl;
2556 // Detect tight gaps:
2557 // - cell is inbetween the two surfaces
2558 // - two surfaces are planarish
2559 // - two surfaces are not too far apart
2560 // (number of walking iterations is a too-coarse measure)
2562 scalarField smallGapDistance(mesh_.nCells(), 0.0);
2564 label nSmallGap = 0;
2566 //OBJstream str(mesh_.time().timePath()/"multiRegion.obj");
2569 forAll(allCellInfo, celli)
2571 if (allCellInfo[celli].valid(wallDistCalc.data()))
2573 const point& cc = mesh_.cellCentres()[celli];
2575 const List<point>& origin = allCellInfo[celli].origin();
2576 const List<FixedList<label, 3>>& surface =
2577 allCellInfo[celli].surface();
2579 // Find pair with minimum distance
2580 for (label i = 0; i < origin.size(); i++)
2582 for (label j = i + 1; j < origin.size(); j++)
2584 //if (isMultiRegion[celli])
2586 // // The intersection locations are too inaccurate
2587 // // (since not proper nearest, just a cell-cell ray
2588 // // intersection) so include always
2590 // smallGapDistance[celli] =
2591 // max(smallGapDistance[celli], maxDist);
2594 // str.writeLine(cc, origin[i]);
2595 // str.writeLine(cc, origin[j]);
2600 if (((cc-origin[i]) & (cc-origin[j])) < 0)
2602 const label surfi = surface[i][0];
2603 const label regioni = surface[i][1];
2605 const label surfj = surface[j][0];
2606 const label regionj = surface[j][1];
2608 const scalar maxSize = max
2610 regionToBlockSize[surfi][regioni],
2611 regionToBlockSize[surfj][regionj]
2616 magSqr(origin[i]-origin[j])
2617 < Foam::sqr(2*maxSize)
2620 const scalar maxDist
2629 smallGapDistance[celli] =
2630 max(smallGapDistance[celli], maxDist);
2642 Info<< "Marked for blocking due to intersecting multiple surfaces : "
2643 << returnReduce(nMulti, sumOp<label>()) << " cells." << endl;
2644 Info<< "Marked for blocking due to close opposite surfaces : "
2645 << returnReduce(nSmallGap, sumOp<label>()) << " cells." << endl;
2648 if (debug&meshRefinement::MESH)
2650 volScalarField distance
2655 mesh_.time().timeName(),
2659 IOobject::NO_REGISTER
2662 dimensionedScalar(dimLength, Zero)
2664 distance.field() = smallGapDistance;
2665 distance.correctBoundaryConditions();
2667 Info<< "Writing all small-gap cells to "
2668 << distance.name() << endl;
2674 const label oldNRefine = nRefine;
2675 forAll(smallGapDistance, celli)
2677 if (smallGapDistance[celli] > SMALL)
2692 Pout<< "Stopped refining since reaching my cell"
2693 << " limit of " << mesh_.nCells()+7*nRefine
2703 returnReduce(nRefine, sumOp<label>())
2704 > returnReduce(nAllowRefine, sumOp<label>())
2707 Info<< "Reached refinement limit." << endl;
2710 return returnReduce(nRefine-oldNRefine, sumOp<label>());
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Dynamically sized Field. Similar to DynamicList, but inheriting from a Field instead of a List.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
A 1D vector of objects of type <T> with a fixed length <N>.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &val)
Append an element at the end of the list.
void setSize(label n)
Alias for resize().
void clear()
Clear the list, i.e. set size to zero.
A HashTable to objects of type <T> with a label key.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
void setSize(const label n, unsigned int val=0u)
Alias for resize().
const labelListList & edgeFaces() const
Return edge-face addressing.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
label find(const T &val) const
Find index of the first occurrence of the value.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
label size() const noexcept
The number of entries in the list.
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
void clearAddressing()
Clear addressing.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void clear() noexcept
Same as reset(nullptr).
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
labelList sortedToc() const
The indices of the on bits as a sorted labelList.
void set(const bitSet &bitset)
Set specified bits from another bitset.
A cell is defined as a list of faces with extra functionality.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A subset of mesh faces organised as a primitive patch.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
static autoPtr< mapDistribute > calcClosure(const polyMesh &mesh, const List< pointField > &zonePoints, const labelList &blockedFaces, const globalIndex &globalBlockedFaces, const bool erode, labelList &closureFaces, labelList &closureToBlocked)
Optional direct use to generate the set of faces and the method to.
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.
writeType
Enumeration for what to write. Used as a bit-pattern.
label countFaceDirs(const bitSet &isOutsideFace, const label celli) const
Count number of faces on cell that are in set.
autoPtr< mapPolyMesh > removeGapCells(const scalar planarAngle, const labelList &minSurfaceLevel, const labelList &globalToMasterPatch, const label growIter)
Detect gapRefinement cells and remove them.
void markOutsideFaces(const labelList &cellLevel, const labelList &neiLevel, const labelList &refineCell, bitSet &isOutsideFace) const
Mark faces on interface between set and rest.
autoPtr< mapPolyMesh > doRemoveCells(const labelList &cellsToRemove, const labelList &exposedFaces, const labelList &exposedPatchIDs, removeCells &cellRemover)
Remove cells. Put exposedFaces into exposedPatchIDs.
static label findCell(const polyMesh &, const vector &perturbVec, const point &p)
Find cell point is in. Uses optional perturbation to re-test.
word timeName() const
Replacement for Time::timeName() that returns oldInstance (if overwrite_).
debugType
Enumeration for what to debug. Used as a bit-pattern.
labelList countEdgeFaces(const uindirectPrimitivePatch &pp) const
Count number of faces per patch edge. Parallel consistent.
void selectSeparatedCoupledFaces(boolList &) const
Select coupled faces that are not collocated.
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.
label addPointZone(const word &name)
Add pointZone if does not exist. Return index of zone.
void selectIntersectedFaces(const labelList &surfaces, boolList &isBlockedFace) const
Faces currently on boundary or intersected by surface.
void growSet(const labelList &neiLevel, const bitSet &isOutsideFace, labelList &refineCell, label &nRefine) const
Add one layer of cells to set.
autoPtr< mapPolyMesh > createBaffles(const labelList &ownPatch, const labelList &neiPatch)
Create baffle for every internal face where ownPatch != -1.
static writeType writeLevel()
Get/set write level.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
A patch is a list of labels that address the faces in the global face list.
Container with cells to refine. Refinement given as single direction.
static List< pointField > zonePoints(const pointField &locationsInMesh, const wordList &zonesInMesh, const pointField &locationsOutsideMesh)
Helper: per zone (entry in zonesInMesh) the locations with.
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
Given list of cells to remove, insert all the topology changes.
labelList getExposedFaces(const bitSet &removedCell) const
Get labels of faces exposed after cells removal.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual const wordList & regions() const =0
Names of regions.
static labelList getUnnamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of unnamed surfaces (surfaces without faceZoneName).
static label addFaceZone(const word &name, const labelList &addressing, const boolList &flipMap, polyMesh &mesh)
IOoject and searching on triSurface.
label markZones(const boolList &borderEdge, labelList &faceZone) const
(size and) fills faceZone with zone of face. Zone is area
An enumeration wrapper for classification of a location as being inside/outside of a volume.
@ MIXED
A location that is partly inside and outside.
Class used to pass additional data in.
For use with FaceCellWave. Determines topological distance to starting faces.
const polyBoundaryMesh & patches
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
List< wallPoints > allFaceInfo(mesh_.nFaces())
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
scalarField smallGapDistance(mesh_.nCells(), 0.0)
const bitSet isBlockedFace(intersectedFaces())
FaceCellWave< wallPoints, wallPoints::trackData > wallDistCalc(mesh_, changedFaces, faceDist, allFaceInfo, allCellInfo, 0, td)
List< wallPoints > allCellInfo(mesh_.nCells())
#define WarningInFunction
Report a warning using Foam::Warning.
Namespace for handling debugging switches.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
scalar distance(const vector &p1, const vector &p2)
List< word > wordList
List of word.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
ZoneMesh< pointZone, polyMesh > pointZoneMesh
A ZoneMesh with pointZone content on a polyMesh.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
UIndirectList< label > labelUIndList
UIndirectList of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with faceZone content on a polyMesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
List< cell > cellList
List of cell.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
vectorField pointField
pointField is a vectorField.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.