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),
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());
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)
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++)
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]];
693 faceList newFaces(globalFaceMap.size());
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];
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();
811 fvMeshSubsetPtr_.reset
833 label nNewPatches = 0;
834 label patchStart = nInternalFaces;
839 if (boundaryPatchSizes[
patchi] > 0)
842 newBoundary[nNewPatches] = oldPatches[
patchi].
clone 844 fvMeshSubsetPtr_().boundaryMesh(),
846 boundaryPatchSizes[
patchi],
850 patchStart += boundaryPatchSizes[
patchi];
851 patchMap_[nNewPatches] =
patchi;
856 if (wantedPatchID == -1)
859 if (boundaryPatchSizes[oldInternalPatchID] > 0)
864 boundaryPatchSizes[oldInternalPatchID],
867 fvMeshSubsetPtr_().boundaryMesh(),
868 internalPolyPatch::typeName
873 patchMap_[nNewPatches] = -1;
883 newBoundary.
setSize(nNewPatches);
884 patchMap_.
setSize(nNewPatches);
887 fvMeshSubsetPtr_().addFvPatches(newBoundary);
897 const label currentRegion,
912 if (region.
size() != oldCells.
size())
915 <<
"Size of region " << region.
size()
916 <<
" is not equal to number of cells in mesh " << oldCells.
size()
921 label wantedPatchID = patchID;
923 if (wantedPatchID == -1)
927 wantedPatchID = oldPatches.
findPatchID(
"oldInternalFaces");
929 else if (wantedPatchID < 0 || wantedPatchID >= oldPatches.
size())
932 <<
"Non-existing patch index " << wantedPatchID <<
endl 933 <<
"Should be between 0 and " << oldPatches.
size()-1
938 faceFlipMapPtr_.clear();
942 label nCellsInSet = 0;
946 if (region[oldCelli] == currentRegion)
948 cellMap_[nCellsInSet++] = oldCelli;
966 label nFacesInSet = 0;
967 forAll(oldFaces, oldFacei)
969 bool faceUsed =
false;
971 if (region[oldOwner[oldFacei]] == currentRegion)
973 nCellsUsingFace[oldFacei]++;
980 && (region[oldNeighbour[oldFacei]] == currentRegion)
983 nCellsUsingFace[oldFacei]++;
996 doCoupledPatches(syncPar, empty, nCellsUsingFace);
1000 label oldInternalPatchID = 0;
1011 if (wantedPatchID == -1)
1019 if (isA<processorPolyPatch>(oldPatches[
patchi]))
1024 oldInternalPatchID++;
1030 for (
label oldPatchi = 0; oldPatchi < nextPatchID; oldPatchi++)
1032 globalPatchMap[oldPatchi] = oldPatchi;
1036 label oldPatchi = nextPatchID;
1037 oldPatchi < oldPatches.
size();
1041 globalPatchMap[oldPatchi] = oldPatchi + 1;
1046 oldInternalPatchID = wantedPatchID;
1047 nextPatchID = wantedPatchID + 1;
1053 labelList boundaryPatchSizes(nbSize, 0);
1063 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1065 if (nCellsUsingFace[oldFacei] == 2)
1067 globalFaceMap[oldFacei] = facei;
1068 faceMap_[facei++] = oldFacei;
1071 markPoints(oldFaces[oldFacei], globalPointMap);
1076 label nInternalFaces = facei;
1081 label oldPatchi = 0;
1082 oldPatchi < oldPatches.
size()
1083 && oldPatchi < nextPatchID;
1087 const polyPatch& oldPatch = oldPatches[oldPatchi];
1093 if (nCellsUsingFace[oldFacei] == 1)
1098 globalFaceMap[oldFacei] = facei;
1099 faceMap_[facei++] = oldFacei;
1102 markPoints(oldFaces[oldFacei], globalPointMap);
1105 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1112 for (
label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++)
1114 if (nCellsUsingFace[oldFacei] == 1)
1116 globalFaceMap[oldFacei] = facei;
1117 faceMap_[facei++] = oldFacei;
1120 markPoints(oldFaces[oldFacei], globalPointMap);
1123 boundaryPatchSizes[oldInternalPatchID]++;
1130 label oldFacei = oldNInternalFaces;
1131 oldFacei < oldFaces.
size();
1135 if (nCellsUsingFace[oldFacei] == 3)
1137 globalFaceMap[oldFacei] = facei;
1138 faceMap_[facei++] = oldFacei;
1141 markPoints(oldFaces[oldFacei], globalPointMap);
1144 boundaryPatchSizes[oldInternalPatchID]++;
1151 label oldPatchi = nextPatchID;
1152 oldPatchi < oldPatches.
size();
1156 const polyPatch& oldPatch = oldPatches[oldPatchi];
1162 if (nCellsUsingFace[oldFacei] == 1)
1167 globalFaceMap[oldFacei] = facei;
1168 faceMap_[facei++] = oldFacei;
1171 markPoints(oldFaces[oldFacei], globalPointMap);
1174 boundaryPatchSizes[globalPatchMap[oldPatchi]]++;
1180 if (facei != nFacesInSet)
1188 label nPointsInSet = 0;
1190 forAll(globalPointMap, pointi)
1192 if (globalPointMap[pointi] != -1)
1197 pointMap_.
setSize(nPointsInSet);
1201 forAll(globalPointMap, pointi)
1203 if (globalPointMap[pointi] != -1)
1205 pointMap_[nPointsInSet] = pointi;
1206 globalPointMap[pointi] = nPointsInSet;
1215 label nNewPoints = 0;
1217 forAll(pointMap_, pointi)
1219 newPoints[nNewPoints] = oldPoints[pointMap_[pointi]];
1225 label nNewFaces = 0;
1228 for (
label facei = 0; facei < nInternalFaces; facei++)
1230 const face& oldF = oldFaces[faceMap_[facei]];
1236 newF[i] = globalPointMap[oldF[i]];
1239 newFaces[nNewFaces] = newF;
1246 for (
label facei = nInternalFaces; facei < faceMap_.
size(); facei++)
1248 const label oldFacei = faceMap_[facei];
1250 face oldF = oldFaces[oldFacei];
1258 region[oldOwner[oldFacei]] != currentRegion
1259 && region[oldNeighbour[oldFacei]] == currentRegion
1262 oldF = oldFaces[oldFacei].reverseFace();
1271 newF[i] = globalPointMap[oldF[i]];
1274 newFaces[nNewFaces] = newF;
1283 label nNewCells = 0;
1287 const labelList& oldC = oldCells[cellMap_[celli]];
1293 newC[i] = globalFaceMap[oldC[i]];
1296 newCells[nNewCells] =
cell(newC);
1302 fvMeshSubsetPtr_.clear();
1310 fvMeshSubsetPtr_.reset
1332 label nNewPatches = 0;
1333 label patchStart = nInternalFaces;
1341 labelList globalPatchSizes(boundaryPatchSizes);
1342 globalPatchSizes.
setSize(nextPatchID);
1362 bool samePatches =
true;
1364 for (
label proci = 1; proci < patchNames.
size(); proci++)
1366 if (patchNames[proci] != patchNames[0])
1368 samePatches =
false;
1386 label oldPatchi = 0;
1387 oldPatchi < oldPatches.
size()
1388 && oldPatchi < nextPatchID;
1392 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1395 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone 1397 fvMeshSubsetPtr_().boundaryMesh(),
1403 patchStart += newSize;
1404 patchMap_[nNewPatches] = oldPatchi;
1410 if (wantedPatchID == -1)
1412 label oldInternalSize = boundaryPatchSizes[oldInternalPatchID];
1420 if (oldInternalSize > 0)
1425 boundaryPatchSizes[oldInternalPatchID],
1428 fvMeshSubsetPtr_().boundaryMesh(),
1429 internalPolyPatch::typeName
1434 patchStart += boundaryPatchSizes[oldInternalPatchID];
1435 patchMap_[nNewPatches] = -1;
1448 label oldPatchi = nextPatchID;
1449 oldPatchi < oldPatches.
size();
1453 const label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]];
1456 newBoundary[nNewPatches] = oldPatches[oldPatchi].
clone 1458 fvMeshSubsetPtr_().boundaryMesh(),
1464 patchStart += newSize;
1465 patchMap_[nNewPatches] = oldPatchi;
1471 newBoundary.
setSize(nNewPatches);
1472 patchMap_.
setSize(nNewPatches);
1476 fvMeshSubsetPtr_().addFvPatches(newBoundary, syncPar);
1486 const label patchID,
1494 region[iter.key()] = 1;
1503 const label currentRegion,
1504 const bool syncCouples
1508 const labelList cellsToRemove(getCellsToRemove(region, currentRegion));
1517 const label currentRegion,
1520 const bool syncCouples
1524 labelList cellsToRemove(getCellsToRemove(region, currentRegion));
1555 pointMap_ = map().pointMap();
1556 faceMap_ = map().faceMap();
1557 cellMap_ = map().cellMap();
1564 return fvMeshSubsetPtr_.valid();
1572 return fvMeshSubsetPtr_();
1580 return fvMeshSubsetPtr_();
1602 if (!faceFlipMapPtr_.valid())
1616 for (
label subFacei = 0; subFacei < subInt; subFacei++)
1618 faceFlipMap[subFacei] = subToBaseFace[subFacei] + 1;
1620 for (
label subFacei = subInt; subFacei < subOwn.
size(); subFacei++)
1622 const label facei = subToBaseFace[subFacei];
1623 if (subToBaseCell[subOwn[subFacei]] == own[facei])
1625 faceFlipMap[subFacei] = facei + 1;
1629 faceFlipMap[subFacei] = -facei - 1;
1634 return faceFlipMapPtr_();
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Constraint patch to hold internal faces exposed by sub-setting.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
autoPtr< IOobject > clone() const
Clone.
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
void setRefinement(const labelList &cellsToRemove, const labelList &facesToExpose, const labelList &patchIDs, polyTopoChange &) const
Play commands into polyTopoChange to remove cells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
label nInternalFaces() const
virtual const labelList & faceNeighbour() const
Return face neighbour.
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Given list of cells to remove insert all the topology changes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label findPatchID(const word &patchName) const
Find patch index given a name.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
const labelList & faceFlipMap() const
Return face map with sign to encode flipped faces.
const cellList & cells() const
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.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
fvMeshSubset(const fvMesh &)
Construct given a mesh to subset.
label size() const
Return number of elements in table.
const labelList & faceMap() const
Return face map.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual const pointField & points() const
Return raw points.
List< bool > boolList
Bool container classes.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
const labelList & patchMap() const
Return patch map.
const fvMesh & subMesh() const
Return reference to subset mesh.
labelList getExposedFaces(const labelList ®ion, const label currentRegion, const bool syncCouples=true) const
Get labels of exposed faces.
bool found(const Key &) const
Return true if hashedEntry is found in table.
wordList names() const
Return a list of patch names.
wordList patchNames(nPatches)
virtual const labelList & faceOwner() const
Return face owner.
virtual ~fvMeshSubset()
Destructor.
const labelList & pointMap() const
Return point map.
static const label labelMax
List< label > labelList
A List of labels.
const labelList & cellMap() const
Return cell map.
virtual const faceList & faces() const
Return raw faces.
MeshZones< pointZone, polyMesh > meshPointZones
A MeshZones with the type pointZone.
errorManip< error > abort(error &err)
MeshZones< cellZone, polyMesh > meshCellZones
A MeshZones with the type cellZone.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void setCellSubset(const labelHashSet &globalCellMap, const label patchID=-1, const bool syncPar=true)
Set the subset. Create "oldInternalFaces" patch for exposed.
defineTypeNameAndDebug(combustionModel, 0)
MeshZones< faceZone, polyMesh > meshFaceZones
A MeshZones with the type faceZone.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word name(const complex &)
Return a string representation of a complex.
label size() const
Return the number of elements in the UPtrList.
void setSize(const label)
Reset size of List.
Template functions to aid in the implementation of demand driven data.
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
A cell is defined as a list of faces with extra functionality.
Mesh data needed to do the Finite Volume discretisation.
Direct mesh changes based on v1.3 polyTopoChange syntax.
label start() const
Return start label of this patch in the polyMesh face list.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
labelList getExposedFaces(const labelList &cellsToRemove) const
Get labels of exposed faces.
List< Key > toc() const
Return the table of contents.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
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 & baseMesh() const
Original mesh.
bool hasSubMesh() const
Have subMesh?