52 bool Foam::fvMeshSubset::checkCellSubset()
const
54 if (fvMeshSubsetPtr_.empty())
57 <<
"void setCellSubset(const labelHashSet& cellsToSubset)" <<
endl
58 <<
"before attempting to access subset data"
70 void Foam::fvMeshSubset::markPoints
79 pointMap.insert(curPoints[pointi], 0);
84 void Foam::fvMeshSubset::markPoints
92 pointMap[curPoints[pointi]] = 0;
97 void Foam::fvMeshSubset::doCoupledPatches
100 Map<label>& facesToSubset,
107 const polyBoundaryMesh& oldPatches = baseMesh().boundaryMesh();
109 label nUncoupled = 0;
116 forAll(oldPatches, oldPatchi)
118 const polyPatch& pp = oldPatches[oldPatchi];
120 if (isA<processorPolyPatch>(pp))
122 const processorPolyPatch& procPatch =
123 refCast<const processorPolyPatch>(pp);
125 UOPstream toNeighbour(procPatch.neighbProcNo(), pBufs);
127 if (!facesToSubset.empty())
129 DynamicList<label> patchFacesToSubset;
134 facesToSubset.found(pp.start()+i)
135 && facesToSubset[pp.start()+i] == 1
138 patchFacesToSubset.append(i);
141 toNeighbour << patchFacesToSubset;
143 else if (!nCellsUsingFace.empty())
146 SubList<label>(nCellsUsingFace, pp.size(), pp.start());
155 pBufs.finishedSends();
158 forAll(oldPatches, oldPatchi)
160 const polyPatch& pp = oldPatches[oldPatchi];
162 if (isA<processorPolyPatch>(pp))
164 const processorPolyPatch& procPatch =
165 refCast<const processorPolyPatch>(pp);
167 UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs);
173 if (!facesToSubset.empty())
181 facesToSubset.found(pp.start()+i)
182 && facesToSubset[pp.start()+i] == 1
183 && !nbrPatchFacesToSubset.found(i)
188 facesToSubset[pp.start()+i] = 3;
193 else if (!nCellsUsingFace.empty())
195 const labelList& nbrCellsUsingFace(nbrList);
203 nCellsUsingFace[pp.start()+i] == 1
204 && nbrCellsUsingFace[i] == 0
209 nCellsUsingFace[pp.start()+i] = 3;
219 forAll(oldPatches, oldPatchi)
221 const polyPatch& pp = oldPatches[oldPatchi];
223 if (isA<cyclicPolyPatch>(pp))
225 const cyclicPolyPatch& cycPatch =
226 refCast<const cyclicPolyPatch>(pp);
228 if (!facesToSubset.empty())
232 const label thisFacei = cycPatch.start() + i;
233 const label otherFacei =
234 cycPatch.transformGlobalFace(thisFacei);
238 facesToSubset.found(thisFacei)
239 && facesToSubset[thisFacei] == 1
240 && !facesToSubset.found(otherFacei)
243 facesToSubset[thisFacei] = 3;
248 else if (!nCellsUsingFace.empty())
252 const label thisFacei = cycPatch.start() + i;
253 const label otherFacei =
254 cycPatch.transformGlobalFace(thisFacei);
258 nCellsUsingFace[thisFacei] == 1
259 && nCellsUsingFace[otherFacei] == 0
262 nCellsUsingFace[thisFacei] = 3;
272 reduce(nUncoupled, sumOp<label>());
275 if (debug && nUncoupled > 0)
277 Info<<
"Uncoupled " << nUncoupled <<
" faces on coupled patches. "
278 <<
"(processorPolyPatch, cyclicPolyPatch)" <<
endl;
292 forAll(selectedElements, i)
294 selected[selectedElements[i]] =
true;
301 if (selected[subsetMap[i]])
313 if (selected[subsetMap[i]])
315 subsettedElements[
n++] = i;
319 return subsettedElements;
323 void Foam::fvMeshSubset::subsetZones()
330 List<pointZone*> pZonePtrs(pointZones.size());
334 const pointZone& pz = pointZones[i];
336 pZonePtrs[i] =
new pointZone
341 fvMeshSubsetPtr_().pointZones()
351 List<faceZone*> fZonePtrs(faceZones.size());
355 const faceZone& fz = faceZones[i];
389 if (zone[meshFacei] != 0)
391 subAddressing[nSub] = subFacei;
392 const label subOwner = subMesh().faceOwner()[subFacei];
393 const label baseOwner = baseMesh().faceOwner()[meshFacei];
395 const bool sameOwner = (cellMap()[subOwner] == baseOwner);
396 const bool flip = (zone[meshFacei] == 1);
397 subFlipStatus[nSub] = (sameOwner == flip);
403 fZonePtrs[i] =
new faceZone
409 fvMeshSubsetPtr_().faceZones()
416 List<cellZone*> cZonePtrs(cellZones.size());
420 const cellZone& cz = cellZones[i];
422 cZonePtrs[i] =
new cellZone
425 subset(baseMesh().nCells(), cz, cellMap()),
427 fvMeshSubsetPtr_().cellZones()
433 fvMeshSubsetPtr_().addZones(pZonePtrs, fZonePtrs, cZonePtrs);
440 const label currentRegion
447 if (region[cellI] == currentRegion)
454 label nRemove = baseMesh().nCells() - nKeep;
460 if (region[cellI] != currentRegion)
462 cellsToRemove[nRemove++] = cellI;
466 return cellsToRemove;
475 fvMeshSubsetPtr_(nullptr),
501 const cellList& oldCells = baseMesh().cells();
502 const faceList& oldFaces = baseMesh().faces();
503 const pointField& oldPoints = baseMesh().points();
504 const labelList& oldOwner = baseMesh().faceOwner();
505 const labelList& oldNeighbour = baseMesh().faceNeighbour();
507 label wantedPatchID = patchID;
509 if (wantedPatchID == -1)
513 wantedPatchID = oldPatches.
findPatchID(
"oldInternalFaces");
515 else if (wantedPatchID < 0 || wantedPatchID >= oldPatches.
size())
518 <<
"Non-existing patch index " << wantedPatchID <<
endl
519 <<
"Should be between 0 and " << oldPatches.
size()-1
525 faceFlipMapPtr_.clear();
528 cellMap_ = globalCellMap.
toc();
534 const label avgNFacesPerCell = 6;
535 const label avgNPointsPerFace = 4;
538 const label nCellsInSet = cellMap_.size();
542 Map<label> facesToSubset(avgNFacesPerCell*nCellsInSet);
547 const labelList& curFaces = oldCells[cellMap_[celli]];
551 if (!facesToSubset.
found(curFaces[facei]))
553 facesToSubset.
insert(curFaces[facei], 1);
557 facesToSubset[curFaces[facei]]++;
564 doCoupledPatches(syncPar, facesToSubset, empty);
570 Map<label> globalPointMap(avgNPointsPerFace*facesToSubset.
size());
577 faceMap_.setSize(facesToc.
size());
582 if (facesToSubset[facesToc[facei]] == 2)
585 faceMap_[globalFaceMap.
size()] = facesToc[facei];
586 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
589 markPoints(oldFaces[facesToc[facei]], globalPointMap);
594 const label nInternalFaces = globalFaceMap.
size();
599 if (wantedPatchID != -1)
601 oldPatchStart = oldPatches[wantedPatchID].start();
608 for (; facei< facesToc.
size(); facei++)
610 if (facesToc[facei] >= oldPatchStart)
616 !baseMesh().isInternalFace(facesToc[facei])
617 && facesToSubset[facesToc[facei]] == 1
621 faceMap_[globalFaceMap.
size()] = facesToc[facei];
622 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
625 markPoints(oldFaces[facesToc[facei]], globalPointMap);
630 forAll(facesToc, intFacei)
635 baseMesh().isInternalFace(facesToc[intFacei])
636 && facesToSubset[facesToc[intFacei]] == 1
639 !baseMesh().isInternalFace(facesToc[intFacei])
640 && facesToSubset[facesToc[intFacei]] == 3
645 faceMap_[globalFaceMap.
size()] = facesToc[intFacei];
646 globalFaceMap.
insert(facesToc[intFacei], globalFaceMap.
size());
649 markPoints(oldFaces[facesToc[intFacei]], globalPointMap);
654 for (; facei< facesToc.
size(); facei++)
658 !baseMesh().isInternalFace(facesToc[facei])
659 && facesToSubset[facesToc[facei]] == 1
663 faceMap_[globalFaceMap.
size()] = facesToc[facei];
664 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
667 markPoints(oldFaces[facesToc[facei]], globalPointMap);
674 pointMap_ = globalPointMap.
toc();
679 globalPointMap[pointMap_[pointi]] = pointi;
685 label nNewPoints = 0;
689 newPoints[nNewPoints] = oldPoints[pointMap_[pointi]];
698 for (
label facei = 0; facei < nInternalFaces; facei++)
700 const face& oldF = oldFaces[faceMap_[facei]];
706 newF[i] = globalPointMap[oldF[i]];
709 newFaces[nNewFaces] = newF;
716 label oldInternalPatchID = -1;
718 if (wantedPatchID == -1)
722 oldInternalPatchID = nbSize;
728 oldInternalPatchID = wantedPatchID;
738 for (
label facei = nInternalFaces; facei < faceMap_.size(); facei++)
740 const label oldFacei = faceMap_[facei];
742 face oldF = oldFaces[oldFacei];
745 if (baseMesh().isInternalFace(oldFacei))
750 !globalCellMap.
found(oldOwner[oldFacei])
751 && globalCellMap.
found(oldNeighbour[oldFacei])
754 oldF = oldFaces[oldFacei].reverseFace();
758 boundaryPatchSizes[oldInternalPatchID]++;
760 else if (facesToSubset[oldFacei] == 3)
763 boundaryPatchSizes[oldInternalPatchID]++;
771 boundaryPatchSizes[patchOfFace]++;
778 newF[i] = globalPointMap[oldF[i]];
781 newFaces[nNewFaces] = newF;
794 const labelList& oldC = oldCells[cellMap_[celli]];
800 newC[i] = globalFaceMap[oldC[i]];
803 newCells[nNewCells] =
cell(newC);
809 fvMeshSubsetPtr_.clear();
812 fvMeshSubsetPtr_.reset
818 baseMesh().
name() +
"SubSet",
819 baseMesh().time().
name(),
833 patchMap_.setSize(nbSize);
834 label nNewPatches = 0;
835 label patchStart = nInternalFaces;
840 if (boundaryPatchSizes[
patchi] > 0)
843 newBoundary[nNewPatches] = oldPatches[
patchi].
clone
845 fvMeshSubsetPtr_().boundaryMesh(),
847 boundaryPatchSizes[
patchi],
851 patchStart += boundaryPatchSizes[
patchi];
852 patchMap_[nNewPatches] =
patchi;
857 if (wantedPatchID == -1)
860 if (boundaryPatchSizes[oldInternalPatchID] > 0)
865 boundaryPatchSizes[oldInternalPatchID],
868 fvMeshSubsetPtr_().boundaryMesh(),
869 internalPolyPatch::typeName
874 patchMap_[nNewPatches] = -1;
884 newBoundary.
setSize(nNewPatches);
885 patchMap_.setSize(nNewPatches);
888 fvMeshSubsetPtr_().addFvPatches(newBoundary);
898 const label currentRegion,
903 const cellList& oldCells = baseMesh().cells();
904 const faceList& oldFaces = baseMesh().faces();
905 const pointField& oldPoints = baseMesh().points();
906 const labelList& oldOwner = baseMesh().faceOwner();
907 const labelList& oldNeighbour = baseMesh().faceNeighbour();
909 const label oldNInternalFaces = baseMesh().nInternalFaces();
913 if (region.
size() != oldCells.
size())
916 <<
"Size of region " << region.
size()
917 <<
" is not equal to number of cells in mesh " << oldCells.
size()
922 label wantedPatchID = patchID;
924 if (wantedPatchID == -1)
928 wantedPatchID = oldPatches.
findPatchID(
"oldInternalFaces");
930 else if (wantedPatchID < 0 || wantedPatchID >= oldPatches.
size())
933 <<
"Non-existing patch index " << wantedPatchID <<
endl
934 <<
"Should be between 0 and " << oldPatches.
size()-1
939 faceFlipMapPtr_.clear();
942 cellMap_.setSize(oldCells.
size());
943 label nCellsInSet = 0;
947 if (region[oldCelli] == currentRegion)
949 cellMap_[nCellsInSet++] = oldCelli;
952 cellMap_.setSize(nCellsInSet);
967 label nFacesInSet = 0;
968 forAll(oldFaces, oldFacei)
970 bool faceUsed =
false;
972 if (region[oldOwner[oldFacei]] == currentRegion)
974 nCellsUsingFace[oldFacei]++;
980 baseMesh().isInternalFace(oldFacei)
981 && (region[oldNeighbour[oldFacei]] == currentRegion)
984 nCellsUsingFace[oldFacei]++;
997 doCoupledPatches(syncPar, empty, nCellsUsingFace);
1001 label oldInternalPatchID = 0;
1012 if (wantedPatchID == -1)
1020 if (isA<processorPolyPatch>(oldPatches[
patchi]))
1025 oldInternalPatchID++;
1031 for (
label oldPatchi = 0; oldPatchi < nextPatchID; oldPatchi++)
1033 globalPatchMap[oldPatchi] = oldPatchi;
1037 label oldPatchi = nextPatchID;
1038 oldPatchi < oldPatches.
size();
1042 globalPatchMap[oldPatchi] = oldPatchi + 1;
1047 oldInternalPatchID = wantedPatchID;
1048 nextPatchID = wantedPatchID + 1;
1054 labelList boundaryPatchSizes(nbSize, 0);
1064 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1066 if (nCellsUsingFace[oldFacei] == 2)
1068 globalFaceMap[oldFacei] = facei;
1069 faceMap_[facei++] = oldFacei;
1072 markPoints(oldFaces[oldFacei], globalPointMap);
1077 label nInternalFaces = facei;
1082 label oldPatchi = 0;
1083 oldPatchi < oldPatches.
size()
1084 && oldPatchi < nextPatchID;
1088 const polyPatch& oldPatch = oldPatches[oldPatchi];
1094 if (nCellsUsingFace[oldFacei] == 1)
1099 globalFaceMap[oldFacei] = facei;
1100 faceMap_[facei++] = oldFacei;
1103 markPoints(oldFaces[oldFacei], globalPointMap);
1106 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1113 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1115 if (nCellsUsingFace[oldFacei] == 1)
1117 globalFaceMap[oldFacei] = facei;
1118 faceMap_[facei++] = oldFacei;
1121 markPoints(oldFaces[oldFacei], globalPointMap);
1124 boundaryPatchSizes[oldInternalPatchID]++;
1131 label oldFacei = oldNInternalFaces;
1132 oldFacei < oldFaces.
size();
1136 if (nCellsUsingFace[oldFacei] == 3)
1138 globalFaceMap[oldFacei] = facei;
1139 faceMap_[facei++] = oldFacei;
1142 markPoints(oldFaces[oldFacei], globalPointMap);
1145 boundaryPatchSizes[oldInternalPatchID]++;
1152 label oldPatchi = nextPatchID;
1153 oldPatchi < oldPatches.
size();
1157 const polyPatch& oldPatch = oldPatches[oldPatchi];
1163 if (nCellsUsingFace[oldFacei] == 1)
1168 globalFaceMap[oldFacei] = facei;
1169 faceMap_[facei++] = oldFacei;
1172 markPoints(oldFaces[oldFacei], globalPointMap);
1175 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1181 if (facei != nFacesInSet)
1189 label nPointsInSet = 0;
1191 forAll(globalPointMap, pointi)
1193 if (globalPointMap[pointi] != -1)
1198 pointMap_.setSize(nPointsInSet);
1202 forAll(globalPointMap, pointi)
1204 if (globalPointMap[pointi] != -1)
1206 pointMap_[nPointsInSet] = pointi;
1207 globalPointMap[pointi] = nPointsInSet;
1216 label nNewPoints = 0;
1218 forAll(pointMap_, pointi)
1220 newPoints[nNewPoints] = oldPoints[pointMap_[pointi]];
1224 faceList newFaces(faceMap_.size());
1226 label nNewFaces = 0;
1229 for (
label facei = 0; facei < nInternalFaces; facei++)
1231 const face& oldF = oldFaces[faceMap_[facei]];
1237 newF[i] = globalPointMap[oldF[i]];
1240 newFaces[nNewFaces] = newF;
1247 for (
label facei = nInternalFaces; facei < faceMap_.size(); facei++)
1249 const label oldFacei = faceMap_[facei];
1251 face oldF = oldFaces[oldFacei];
1254 if (baseMesh().isInternalFace(oldFacei))
1259 region[oldOwner[oldFacei]] != currentRegion
1260 && region[oldNeighbour[oldFacei]] == currentRegion
1263 oldF = oldFaces[oldFacei].reverseFace();
1272 newF[i] = globalPointMap[oldF[i]];
1275 newFaces[nNewFaces] = newF;
1284 label nNewCells = 0;
1288 const labelList& oldC = oldCells[cellMap_[celli]];
1294 newC[i] = globalFaceMap[oldC[i]];
1297 newCells[nNewCells] =
cell(newC);
1303 fvMeshSubsetPtr_.clear();
1311 fvMeshSubsetPtr_.reset
1318 baseMesh().time().
name(),
1332 patchMap_.setSize(nbSize);
1333 label nNewPatches = 0;
1334 label patchStart = nInternalFaces;
1342 labelList globalPatchSizes(boundaryPatchSizes);
1343 globalPatchSizes.
setSize(nextPatchID);
1363 bool samePatches =
true;
1369 samePatches =
false;
1387 label oldPatchi = 0;
1388 oldPatchi < oldPatches.
size()
1389 && oldPatchi < nextPatchID;
1393 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1396 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone
1398 fvMeshSubsetPtr_().boundaryMesh(),
1404 patchStart += newSize;
1405 patchMap_[nNewPatches] = oldPatchi;
1411 if (wantedPatchID == -1)
1413 label oldInternalSize = boundaryPatchSizes[oldInternalPatchID];
1421 if (oldInternalSize > 0)
1426 boundaryPatchSizes[oldInternalPatchID],
1429 fvMeshSubsetPtr_().boundaryMesh(),
1430 internalPolyPatch::typeName
1435 patchStart += boundaryPatchSizes[oldInternalPatchID];
1436 patchMap_[nNewPatches] = -1;
1449 label oldPatchi = nextPatchID;
1450 oldPatchi < oldPatches.
size();
1454 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1457 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone
1459 fvMeshSubsetPtr_().boundaryMesh(),
1465 patchStart += newSize;
1466 patchMap_[nNewPatches] = oldPatchi;
1472 newBoundary.
setSize(nNewPatches);
1473 patchMap_.setSize(nNewPatches);
1477 fvMeshSubsetPtr_().addFvPatches(newBoundary, syncPar);
1487 const label patchID,
1491 labelList region(baseMesh().nCells(), 0);
1495 region[iter.key()] = 1;
1497 setLargeCellSubset(region, 1, patchID, syncPar);
1504 const label currentRegion,
1505 const bool syncCouples
1509 const labelList cellsToRemove(getCellsToRemove(region, currentRegion));
1518 const label currentRegion,
1521 const bool syncCouples
1525 labelList cellsToRemove(getCellsToRemove(region, currentRegion));
1547 baseMesh().time().
name(),
1556 pointMap_ = map().pointMap();
1557 faceMap_ = map().faceMap();
1558 cellMap_ = map().cellMap();
1559 patchMap_ =
identityMap(baseMesh().boundaryMesh().size());
1565 return fvMeshSubsetPtr_.valid();
1573 return fvMeshSubsetPtr_();
1581 return fvMeshSubsetPtr_();
1603 if (!faceFlipMapPtr_.valid())
1606 const labelList& subToBaseCell = cellMap();
1609 labelList& faceFlipMap = faceFlipMapPtr_();
1613 label subInt = subMesh().nInternalFaces();
1614 const labelList& subOwn = subMesh().faceOwner();
1615 const labelList& own = baseMesh_.faceOwner();
1617 for (
label subFacei = 0; subFacei < subInt; subFacei++)
1619 faceFlipMap[subFacei] = subToBaseFace[subFacei] + 1;
1621 for (
label subFacei = subInt; subFacei < subOwn.
size(); subFacei++)
1623 const label facei = subToBaseFace[subFacei];
1624 if (subToBaseCell[subOwn[subFacei]] == own[facei])
1626 faceFlipMap[subFacei] = facei + 1;
1630 faceFlipMap[subFacei] = -facei - 1;
1635 return faceFlipMapPtr_();
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
List< Key > toc() const
Return the table of contents.
label size() const
Return number of elements in table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
bool found(const Key &) const
Return true if hashedEntry is found in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
autoPtr< IOobject > clone() const
Clone.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the number of elements in the UPtrList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A cell is defined as a list of faces with extra functionality.
A face is a list of labels corresponding to mesh vertices.
Post-processing mesh subset tool. Given the original mesh and the list of selected cells,...
const labelList & faceMap() const
Return face map.
void setCellSubset(const labelHashSet &globalCellMap, const label patchID=-1, const bool syncPar=true)
Set the subset. Create "oldInternalFaces" patch for exposed.
const labelList & cellMap() const
Return cell map.
fvMeshSubset(const fvMesh &)
Construct given a mesh to subset.
bool hasSubMesh() const
Have subMesh?
const labelList & faceFlipMap() const
Return face map with sign to encode flipped faces.
virtual ~fvMeshSubset()
Destructor.
void setLargeCellSubset(const labelList ®ion, const label currentRegion, const label patchID=-1, const bool syncCouples=true)
Set the subset from all cells with region == currentRegion.
const fvMesh & subMesh() const
Return reference to subset mesh.
const labelList & patchMap() const
Return patch map.
const labelList & pointMap() const
Return point map.
labelList getExposedFaces(const labelList ®ion, const label currentRegion, const bool syncCouples=true) const
Get labels of exposed faces.
Mesh data needed to do the Finite Volume discretisation.
Constraint patch to hold internal faces exposed by sub-setting.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
label findPatchID(const word &patchName) const
Find patch index given a name.
wordList names() const
Return a list of patch names.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
autoPtr< polyTopoChangeMap > makeMesh(autoPtr< fvMesh > &newMesh, const IOobject &io, const polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Create new mesh with old mesh patches.
Given list of cells to remove insert all the topology changes.
void setRefinement(const labelList &cellsToRemove, const labelList &facesToExpose, const labelList &patchIDs, polyTopoChange &) const
Play commands into polyTopoChange to remove cells.
labelList getExposedFaces(const labelList &cellsToRemove) const
Get labels of exposed faces.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
MeshZones< cellZone, polyMesh > meshCellZones
A MeshZones with the type cellZone.
List< bool > boolList
Bool container classes.
MeshZones< pointZone, polyMesh > meshPointZones
A MeshZones with the type pointZone.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
defineTypeNameAndDebug(combustionModel, 0)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
static const label labelMax
MeshZones< faceZone, polyMesh > meshFaceZones
A MeshZones with the type faceZone.
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
word name(const complex &)
Return a string representation of a complex.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
wordList patchNames(nPatches)