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().poly().boundary();
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()
327 const pointZoneList& pointZones = baseMesh().pointZones();
334 const pointZone& pz = pointZones[i];
336 pZonePtrs[i] =
new pointZone
340 fvMeshSubsetPtr_().pointZones()
346 const faceZoneList& faceZones = baseMesh().faceZones();
354 const faceZone& fz = faceZones[i];
364 const boolList& flipMap = fz.flipMap();
400 if (zone[meshFacei] != 0)
402 subAddressing[nSub] = subFacei;
403 const label subOwner = subMesh().faceOwner()[subFacei];
404 const label baseOwner = baseMesh().faceOwner()[meshFacei];
406 const bool sameOwner = (cellMap()[subOwner] == baseOwner);
407 const bool flip = (zone[meshFacei] == 1);
408 subFlipStatus[nSub] = (sameOwner == flip);
416 fZonePtrs[i] =
new faceZone
421 fvMeshSubsetPtr_().faceZones()
426 fZonePtrs[i] =
new faceZone
430 fvMeshSubsetPtr_().faceZones()
436 const cellZoneList& cellZones = baseMesh().cellZones();
442 const cellZone& cz = cellZones[i];
444 cZonePtrs[i] =
new cellZone
447 subset(baseMesh().nCells(), cz, cellMap()),
448 fvMeshSubsetPtr_().cellZones()
454 fvMeshSubsetPtr_().addZones(pZonePtrs, fZonePtrs, cZonePtrs);
461 const label currentRegion
468 if (
region[cellI] == currentRegion)
475 label nRemove = baseMesh().nCells() - nKeep;
481 if (
region[cellI] != currentRegion)
483 cellsToRemove[nRemove++] = cellI;
487 return cellsToRemove;
496 fvMeshSubsetPtr_(nullptr),
522 const cellList& oldCells = baseMesh().cells();
523 const faceList& oldFaces = baseMesh().faces();
524 const pointField& oldPoints = baseMesh().points();
525 const labelList& oldOwner = baseMesh().faceOwner();
526 const labelList& oldNeighbour = baseMesh().faceNeighbour();
528 label wantedPatchID = patchID;
530 if (wantedPatchID == -1)
534 wantedPatchID = oldPatches.
findIndex(
"oldInternalFaces");
536 else if (wantedPatchID < 0 || wantedPatchID >= oldPatches.
size())
539 <<
"Non-existing patch index " << wantedPatchID <<
endl
540 <<
"Should be between 0 and " << oldPatches.
size()-1
546 faceFlipMapPtr_.clear();
549 cellMap_ = globalCellMap.
toc();
555 const label avgNFacesPerCell = 6;
556 const label avgNPointsPerFace = 4;
559 const label nCellsInSet = cellMap_.size();
563 Map<label> facesToSubset(avgNFacesPerCell*nCellsInSet);
568 const labelList& curFaces = oldCells[cellMap_[celli]];
572 if (!facesToSubset.
found(curFaces[facei]))
574 facesToSubset.
insert(curFaces[facei], 1);
578 facesToSubset[curFaces[facei]]++;
585 doCoupledPatches(syncPar, facesToSubset, empty);
591 Map<label> globalPointMap(avgNPointsPerFace*facesToSubset.
size());
598 faceMap_.setSize(facesToc.
size());
603 if (facesToSubset[facesToc[facei]] == 2)
606 faceMap_[globalFaceMap.
size()] = facesToc[facei];
607 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
610 markPoints(oldFaces[facesToc[facei]], globalPointMap);
615 const label nInternalFaces = globalFaceMap.
size();
620 if (wantedPatchID != -1)
622 oldPatchStart = oldPatches[wantedPatchID].start();
629 for (; facei< facesToc.
size(); facei++)
631 if (facesToc[facei] >= oldPatchStart)
637 !baseMesh().isInternalFace(facesToc[facei])
638 && facesToSubset[facesToc[facei]] == 1
642 faceMap_[globalFaceMap.
size()] = facesToc[facei];
643 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
646 markPoints(oldFaces[facesToc[facei]], globalPointMap);
651 forAll(facesToc, intFacei)
656 baseMesh().isInternalFace(facesToc[intFacei])
657 && facesToSubset[facesToc[intFacei]] == 1
660 !baseMesh().isInternalFace(facesToc[intFacei])
661 && facesToSubset[facesToc[intFacei]] == 3
666 faceMap_[globalFaceMap.
size()] = facesToc[intFacei];
667 globalFaceMap.
insert(facesToc[intFacei], globalFaceMap.
size());
670 markPoints(oldFaces[facesToc[intFacei]], globalPointMap);
675 for (; facei< facesToc.
size(); facei++)
679 !baseMesh().isInternalFace(facesToc[facei])
680 && facesToSubset[facesToc[facei]] == 1
684 faceMap_[globalFaceMap.
size()] = facesToc[facei];
685 globalFaceMap.
insert(facesToc[facei], globalFaceMap.
size());
688 markPoints(oldFaces[facesToc[facei]], globalPointMap);
695 pointMap_ = globalPointMap.
toc();
700 globalPointMap[pointMap_[pointi]] = pointi;
706 label nNewPoints = 0;
710 newPoints[nNewPoints] = oldPoints[pointMap_[pointi]];
719 for (
label facei = 0; facei < nInternalFaces; facei++)
721 const face& oldF = oldFaces[faceMap_[facei]];
727 newF[i] = globalPointMap[oldF[i]];
730 newFaces[nNewFaces] = newF;
737 label oldInternalPatchID = -1;
739 if (wantedPatchID == -1)
743 oldInternalPatchID = nbSize;
749 oldInternalPatchID = wantedPatchID;
759 for (
label facei = nInternalFaces; facei < faceMap_.size(); facei++)
761 const label oldFacei = faceMap_[facei];
763 face oldF = oldFaces[oldFacei];
766 if (baseMesh().isInternalFace(oldFacei))
771 !globalCellMap.
found(oldOwner[oldFacei])
772 && globalCellMap.
found(oldNeighbour[oldFacei])
775 oldF = oldFaces[oldFacei].reverseFace();
779 boundaryPatchSizes[oldInternalPatchID]++;
781 else if (facesToSubset[oldFacei] == 3)
784 boundaryPatchSizes[oldInternalPatchID]++;
792 boundaryPatchSizes[patchOfFace]++;
799 newF[i] = globalPointMap[oldF[i]];
802 newFaces[nNewFaces] = newF;
815 const labelList& oldC = oldCells[cellMap_[celli]];
821 newC[i] = globalFaceMap[oldC[i]];
824 newCells[nNewCells] =
cell(newC);
830 fvMeshSubsetPtr_.clear();
833 fvMeshSubsetPtr_.reset
839 baseMesh().
name() +
"SubSet",
854 patchMap_.setSize(nbSize);
855 label nNewPatches = 0;
856 label patchStart = nInternalFaces;
861 if (boundaryPatchSizes[
patchi] > 0)
864 newBoundary[nNewPatches] = oldPatches[
patchi].
clone
866 fvMeshSubsetPtr_().poly().
boundary(),
868 boundaryPatchSizes[
patchi],
872 patchStart += boundaryPatchSizes[
patchi];
873 patchMap_[nNewPatches] =
patchi;
878 if (wantedPatchID == -1)
881 if (boundaryPatchSizes[oldInternalPatchID] > 0)
886 boundaryPatchSizes[oldInternalPatchID],
889 fvMeshSubsetPtr_().poly().
boundary()
894 patchMap_[nNewPatches] = -1;
904 newBoundary.
setSize(nNewPatches);
905 patchMap_.setSize(nNewPatches);
908 fvMeshSubsetPtr_().addFvPatches(newBoundary);
918 const label currentRegion,
923 const cellList& oldCells = baseMesh().cells();
924 const faceList& oldFaces = baseMesh().faces();
925 const pointField& oldPoints = baseMesh().points();
926 const labelList& oldOwner = baseMesh().faceOwner();
927 const labelList& oldNeighbour = baseMesh().faceNeighbour();
929 const label oldNInternalFaces = baseMesh().nInternalFaces();
937 <<
" is not equal to number of cells in mesh " << oldCells.
size()
942 label wantedPatchID = patchID;
944 if (wantedPatchID == -1)
948 wantedPatchID = oldPatches.
findIndex(
"oldInternalFaces");
950 else if (wantedPatchID < 0 || wantedPatchID >= oldPatches.
size())
953 <<
"Non-existing patch index " << wantedPatchID <<
endl
954 <<
"Should be between 0 and " << oldPatches.
size()-1
959 faceFlipMapPtr_.clear();
962 cellMap_.setSize(oldCells.
size());
963 label nCellsInSet = 0;
967 if (
region[oldCelli] == currentRegion)
969 cellMap_[nCellsInSet++] = oldCelli;
972 cellMap_.setSize(nCellsInSet);
987 label nFacesInSet = 0;
988 forAll(oldFaces, oldFacei)
990 bool faceUsed =
false;
992 if (
region[oldOwner[oldFacei]] == currentRegion)
994 nCellsUsingFace[oldFacei]++;
1000 baseMesh().isInternalFace(oldFacei)
1001 && (
region[oldNeighbour[oldFacei]] == currentRegion)
1004 nCellsUsingFace[oldFacei]++;
1013 faceMap_.
setSize(nFacesInSet);
1017 doCoupledPatches(syncPar, empty, nCellsUsingFace);
1021 label oldInternalPatchID = 0;
1032 if (wantedPatchID == -1)
1040 if (isA<processorPolyPatch>(oldPatches[
patchi]))
1045 oldInternalPatchID++;
1051 for (
label oldPatchi = 0; oldPatchi < nextPatchID; oldPatchi++)
1053 globalPatchMap[oldPatchi] = oldPatchi;
1057 label oldPatchi = nextPatchID;
1058 oldPatchi < oldPatches.
size();
1062 globalPatchMap[oldPatchi] = oldPatchi + 1;
1067 oldInternalPatchID = wantedPatchID;
1068 nextPatchID = wantedPatchID + 1;
1074 labelList boundaryPatchSizes(nbSize, 0);
1084 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1086 if (nCellsUsingFace[oldFacei] == 2)
1088 globalFaceMap[oldFacei] = facei;
1089 faceMap_[facei++] = oldFacei;
1092 markPoints(oldFaces[oldFacei], globalPointMap);
1097 label nInternalFaces = facei;
1102 label oldPatchi = 0;
1103 oldPatchi < oldPatches.
size()
1104 && oldPatchi < nextPatchID;
1108 const polyPatch& oldPatch = oldPatches[oldPatchi];
1114 if (nCellsUsingFace[oldFacei] == 1)
1119 globalFaceMap[oldFacei] = facei;
1120 faceMap_[facei++] = oldFacei;
1123 markPoints(oldFaces[oldFacei], globalPointMap);
1126 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1133 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1135 if (nCellsUsingFace[oldFacei] == 1)
1137 globalFaceMap[oldFacei] = facei;
1138 faceMap_[facei++] = oldFacei;
1141 markPoints(oldFaces[oldFacei], globalPointMap);
1144 boundaryPatchSizes[oldInternalPatchID]++;
1151 label oldFacei = oldNInternalFaces;
1152 oldFacei < oldFaces.
size();
1156 if (nCellsUsingFace[oldFacei] == 3)
1158 globalFaceMap[oldFacei] = facei;
1159 faceMap_[facei++] = oldFacei;
1162 markPoints(oldFaces[oldFacei], globalPointMap);
1165 boundaryPatchSizes[oldInternalPatchID]++;
1172 label oldPatchi = nextPatchID;
1173 oldPatchi < oldPatches.
size();
1177 const polyPatch& oldPatch = oldPatches[oldPatchi];
1183 if (nCellsUsingFace[oldFacei] == 1)
1188 globalFaceMap[oldFacei] = facei;
1189 faceMap_[facei++] = oldFacei;
1192 markPoints(oldFaces[oldFacei], globalPointMap);
1195 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1201 if (facei != nFacesInSet)
1209 label nPointsInSet = 0;
1211 forAll(globalPointMap, pointi)
1213 if (globalPointMap[pointi] != -1)
1218 pointMap_.setSize(nPointsInSet);
1222 forAll(globalPointMap, pointi)
1224 if (globalPointMap[pointi] != -1)
1226 pointMap_[nPointsInSet] = pointi;
1227 globalPointMap[pointi] = nPointsInSet;
1236 label nNewPoints = 0;
1238 forAll(pointMap_, pointi)
1240 newPoints[nNewPoints] = oldPoints[pointMap_[pointi]];
1244 faceList newFaces(faceMap_.size());
1246 label nNewFaces = 0;
1249 for (
label facei = 0; facei < nInternalFaces; facei++)
1251 const face& oldF = oldFaces[faceMap_[facei]];
1257 newF[i] = globalPointMap[oldF[i]];
1260 newFaces[nNewFaces] = newF;
1267 for (
label facei = nInternalFaces; facei < faceMap_.size(); facei++)
1269 const label oldFacei = faceMap_[facei];
1271 face oldF = oldFaces[oldFacei];
1274 if (baseMesh().isInternalFace(oldFacei))
1279 region[oldOwner[oldFacei]] != currentRegion
1280 &&
region[oldNeighbour[oldFacei]] == currentRegion
1283 oldF = oldFaces[oldFacei].reverseFace();
1292 newF[i] = globalPointMap[oldF[i]];
1295 newFaces[nNewFaces] = newF;
1304 label nNewCells = 0;
1308 const labelList& oldC = oldCells[cellMap_[celli]];
1314 newC[i] = globalFaceMap[oldC[i]];
1317 newCells[nNewCells] =
cell(newC);
1323 fvMeshSubsetPtr_.clear();
1331 fvMeshSubsetPtr_.reset
1352 patchMap_.setSize(nbSize);
1353 label nNewPatches = 0;
1354 label patchStart = nInternalFaces;
1362 labelList globalPatchSizes(boundaryPatchSizes);
1363 globalPatchSizes.
setSize(nextPatchID);
1383 bool samePatches =
true;
1389 samePatches =
false;
1407 label oldPatchi = 0;
1408 oldPatchi < oldPatches.
size()
1409 && oldPatchi < nextPatchID;
1413 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1416 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone
1418 fvMeshSubsetPtr_().poly().
boundary(),
1424 patchStart += newSize;
1425 patchMap_[nNewPatches] = oldPatchi;
1431 if (wantedPatchID == -1)
1433 label oldInternalSize = boundaryPatchSizes[oldInternalPatchID];
1441 if (oldInternalSize > 0)
1446 boundaryPatchSizes[oldInternalPatchID],
1449 fvMeshSubsetPtr_().poly().
boundary()
1454 patchStart += boundaryPatchSizes[oldInternalPatchID];
1455 patchMap_[nNewPatches] = -1;
1468 label oldPatchi = nextPatchID;
1469 oldPatchi < oldPatches.
size();
1473 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1476 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone
1478 fvMeshSubsetPtr_().poly().
boundary(),
1484 patchStart += newSize;
1485 patchMap_[nNewPatches] = oldPatchi;
1491 newBoundary.
setSize(nNewPatches);
1492 patchMap_.setSize(nNewPatches);
1496 fvMeshSubsetPtr_().addFvPatches(newBoundary, syncPar);
1506 const label patchID,
1516 setLargeCellSubset(
region, 1, patchID, syncPar);
1523 const label currentRegion,
1524 const bool syncCouples
1528 const labelList cellsToRemove(getCellsToRemove(
region, currentRegion));
1537 const label currentRegion,
1540 const bool syncCouples
1575 pointMap_ = map().pointMap();
1576 faceMap_ = map().faceMap();
1577 cellMap_ = map().cellMap();
1584 return fvMeshSubsetPtr_.valid();
1592 return fvMeshSubsetPtr_();
1600 return fvMeshSubsetPtr_();
1622 if (!faceFlipMapPtr_.valid())
1625 const labelList& subToBaseCell = cellMap();
1628 labelList& faceFlipMap = faceFlipMapPtr_();
1632 label subInt = subMesh().nInternalFaces();
1633 const labelList& subOwn = subMesh().faceOwner();
1634 const labelList& own = baseMesh_.faceOwner();
1636 for (
label subFacei = 0; subFacei < subInt; subFacei++)
1638 faceFlipMap[subFacei] = subToBaseFace[subFacei] + 1;
1640 for (
label subFacei = subInt; subFacei < subOwn.
size(); subFacei++)
1642 const label facei = subToBaseFace[subFacei];
1643 if (subToBaseCell[subOwn[subFacei]] == own[facei])
1645 faceFlipMap[subFacei] = facei + 1;
1649 faceFlipMap[subFacei] = -facei - 1;
1654 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.
label size() const
Return fvMesh size.
Constraint patch to hold internal faces exposed by sub-setting.
Motion of the mesh specified as a list of pointMeshMovers.
label findIndex(const word &patchName) const
Find patch index given a name.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
wordList names() const
Return the 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)
const fvMesh & region(const dictionary &dict)
Cast the give dictionary to the corresponding region fvMesh.
List< bool > boolList
Bool container classes.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
static const label labelMax
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
wordList patchNames(nPatches)
faceListList boundary(nPatches)