45 DynamicList<word>& allPatchNames,
46 DynamicList<word>& allPatchTypes
51 const word& pType = p.type();
52 const word& pName = p.name();
59 allPatchNames.append(pName);
60 allPatchTypes.append(pType);
62 return allPatchNames.size() - 1;
64 else if (allPatchTypes[patchi] == pType)
75 const word& caseName = p.boundaryMesh().mesh().time().caseName();
77 allPatchNames.append(pName +
"_" + caseName);
78 allPatchTypes.append(pType);
80 Pout<<
"label patchIndex(const polyPatch& p) : " 81 <<
"Patch " << p.index() <<
" named " 82 << pName <<
" in mesh " << caseName
83 <<
" already exists, but patch types" 84 <<
" do not match.\nCreating a composite name as " 85 << allPatchNames.last() <<
endl;
87 return allPatchNames.size() - 1;
96 DynamicList<word>& names
108 names.append(curName);
110 return names.size() - 1;
115 void Foam::polyMeshAdder::mergePatchNames
117 const polyBoundaryMesh& patches0,
118 const polyBoundaryMesh& patches1,
120 DynamicList<word>& allPatchNames,
121 DynamicList<word>& allPatchTypes,
128 allPatchNames.append(patches0.names());
129 allPatchTypes.append(patches0.types());
139 from1ToAllPatches.setSize(patches1.size());
143 from1ToAllPatches[
patchi] = patchIndex
150 allPatchTypes.shrink();
151 allPatchNames.shrink();
154 fromAllTo1Patches.setSize(allPatchNames.size());
155 fromAllTo1Patches = -1;
157 forAll(from1ToAllPatches, i)
159 fromAllTo1Patches[from1ToAllPatches[i]] = i;
166 const polyBoundaryMesh& patches
180 const polyBoundaryMesh& patches
194 const polyMesh& mesh0,
195 const polyMesh& mesh1,
196 const polyBoundaryMesh& allBoundaryMesh,
197 const label nAllPatches,
200 const label nInternalFaces,
207 const polyBoundaryMesh& patches0 = mesh0.boundaryMesh();
208 const polyBoundaryMesh& patches1 = mesh1.boundaryMesh();
212 DynamicList<polyPatch*> allPatches(nAllPatches);
216 from0ToAllPatches.setSize(patches0.size());
217 from0ToAllPatches = -1;
219 label startFacei = nInternalFaces;
227 label filteredPatchi;
229 if (nFaces[patchi] == 0 && isA<processorPolyPatch>(patches0[patchi]))
237 filteredPatchi = allPatches.size();
241 patches0[patchi].clone
249 startFacei += nFaces[
patchi];
253 from0ToAllPatches[
patchi] = filteredPatchi;
256 if (fromAllTo1Patches[patchi] != -1)
258 from1ToAllPatches[fromAllTo1Patches[
patchi]] = filteredPatchi;
263 forAll(from1ToAllPatches, patchi)
267 if (allPatchi >= patches0.size())
271 label filteredPatchi;
275 nFaces[allPatchi] == 0
276 && isA<processorPolyPatch>(patches1[patchi])
285 filteredPatchi = allPatches.size();
289 patches1[patchi].clone
297 startFacei += nFaces[allPatchi];
300 from1ToAllPatches[
patchi] = filteredPatchi;
313 const label nInternalFaces,
321 for (
label facei = nInternalFaces; facei < owner.size(); ++facei)
323 oldToNew[facei] = facei;
333 SortableList<label> nbr(cFaces.size());
337 label facei = cFaces[i];
339 label nbrCelli = neighbour[facei];
344 if (nbrCelli == celli)
346 nbrCelli = owner[facei];
349 if (celli < nbrCelli)
373 oldToNew[cFaces[nbr.indices()[i]]] = newFacei++;
382 if (oldToNew[facei] == -1)
385 <<
"Did not determine new position" 386 <<
" for face " << facei
397 void Foam::polyMeshAdder::insertVertices
400 const Map<label>& meshToMaster,
404 DynamicList<label>& workFace,
415 label v0 = masterF[fp];
416 label v1 = masterF.nextLabel(fp);
419 workFace.append(allF[fp]);
424 if (v0Fnd != meshToMaster.end())
427 if (v1Fnd != meshToMaster.end())
432 masterToCutPoints[v0Fnd()],
433 masterToCutPoints[v1Fnd()]
438 if (iter != cutEdgeToPoints.end())
440 const edge& e = iter.key();
444 if (e[0] == cutEdge[0])
448 workFace.append(addedPoints[i]);
455 workFace.append(addedPoints[i]);
463 if (workFace.size() != allF.size())
465 allF.transfer(workFace);
482 void Foam::polyMeshAdder::mergePrimitives
484 const polyMesh& mesh0,
485 const polyMesh& mesh1,
486 const faceCoupleInfo& coupleInfo,
488 const label nAllPatches,
499 label& nInternalFaces,
508 const polyBoundaryMesh& patches0 = mesh0.boundaryMesh();
509 const polyBoundaryMesh& patches1 = mesh1.boundaryMesh();
520 allPoints.setSize(mesh0.nPoints() + mesh1.nPoints());
523 from0ToAllPoints.setSize(mesh0.nPoints());
524 from0ToAllPoints = -1;
525 from1ToAllPoints.setSize(mesh1.nPoints());
526 from1ToAllPoints = -1;
530 const pointField& cutPoints = coupleInfo.cutPoints();
539 coupleInfo.masterToCutPoints()
550 coupleInfo.slaveToCutPoints()
556 allPoints[allPointi] = cutPoints[i];
560 const labelList& masterPoints = cutToMasterPoints[i];
564 label mesh0Pointi = masterPatch.meshPoints()[masterPoints[j]];
565 from0ToAllPoints[mesh0Pointi] = allPointi;
568 const labelList& slavePoints = cutToSlavePoints[i];
572 label mesh1Pointi = slavePatch.meshPoints()[slavePoints[j]];
573 from1ToAllPoints[mesh1Pointi] = allPointi;
580 forAll(mesh0.points(), pointi)
582 if (from0ToAllPoints[pointi] == -1)
584 allPoints[allPointi] = mesh0.points()[pointi];
585 from0ToAllPoints[pointi] = allPointi;
591 forAll(mesh1.points(), pointi)
593 if (from1ToAllPoints[pointi] == -1)
595 allPoints[allPointi] = mesh1.points()[pointi];
596 from1ToAllPoints[pointi] = allPointi;
601 allPoints.setSize(allPointi);
608 nFacesPerPatch.setSize(nAllPatches);
612 allFaces.setSize(mesh0.nFaces() + mesh1.nFaces());
613 allOwner.setSize(allFaces.size());
615 allNeighbour.setSize(allFaces.size());
619 from0ToAllFaces.setSize(mesh0.nFaces());
620 from0ToAllFaces = -1;
621 from1ToAllFaces.setSize(mesh1.nFaces());
622 from1ToAllFaces = -1;
625 for (
label facei = 0; facei < mesh0.nInternalFaces(); facei++)
627 allFaces[allFacei] =
renumber(from0ToAllPoints, mesh0.faces()[facei]);
628 allOwner[allFacei] = mesh0.faceOwner()[facei];
629 allNeighbour[allFacei] = mesh0.faceNeighbour()[facei];
630 from0ToAllFaces[facei] = allFacei++;
635 const labelList& cutToMasterFaces = coupleInfo.cutToMasterFaces();
636 const labelList& cutToSlaveFaces = coupleInfo.cutToSlaveFaces();
640 label masterFacei = cutToMasterFaces[i];
642 label mesh0Facei = masterPatch.addressing()[masterFacei];
644 if (from0ToAllFaces[mesh0Facei] == -1)
647 from0ToAllFaces[mesh0Facei] = allFacei;
650 label patch0 = patches0.whichPatch(mesh0Facei);
651 nFacesPerPatch[patch0]--;
654 label slaveFacei = cutToSlaveFaces[i];
656 label mesh1Facei = slavePatch.addressing()[slaveFacei];
658 if (from1ToAllFaces[mesh1Facei] == -1)
660 from1ToAllFaces[mesh1Facei] = allFacei;
662 label patch1 = patches1.whichPatch(mesh1Facei);
663 nFacesPerPatch[from1ToAllPatches[patch1]]--;
668 allFaces[allFacei] = cutFaces[i];
669 allOwner[allFacei] = mesh0.faceOwner()[mesh0Facei];
670 allNeighbour[allFacei] = mesh1.faceOwner()[mesh1Facei] + mesh0.nCells();
676 for (
label facei = 0; facei < mesh1.nInternalFaces(); facei++)
678 allFaces[allFacei] =
renumber(from1ToAllPoints, mesh1.faces()[facei]);
679 allOwner[allFacei] = mesh1.faceOwner()[facei] + mesh0.nCells();
680 allNeighbour[allFacei] = mesh1.faceNeighbour()[facei] + mesh0.nCells();
681 from1ToAllFaces[facei] = allFacei++;
684 nInternalFaces = allFacei;
687 for (
label allPatchi = 0; allPatchi < nAllPatches; allPatchi++)
689 if (allPatchi < patches0.size())
692 const polyPatch& pp = patches0[allPatchi];
694 nFacesPerPatch[allPatchi] += pp.size();
696 label facei = pp.start();
700 if (from0ToAllFaces[facei] == -1)
708 allOwner[allFacei] = mesh0.faceOwner()[facei];
709 allNeighbour[allFacei] = -1;
711 from0ToAllFaces[facei] = allFacei++;
716 if (fromAllTo1Patches[allPatchi] != -1)
719 const polyPatch& pp = patches1[fromAllTo1Patches[allPatchi]];
721 nFacesPerPatch[allPatchi] += pp.size();
723 label facei = pp.start();
727 if (from1ToAllFaces[facei] == -1)
736 mesh1.faceOwner()[facei]
738 allNeighbour[allFacei] = -1;
740 from1ToAllFaces[facei] = allFacei++;
746 allFaces.setSize(allFacei);
747 allOwner.setSize(allFacei);
748 allNeighbour.setSize(allFacei);
763 const edgeLookup& cutEdgeToPoints = coupleInfo.cutEdgeToPoints();
768 forAll(cutToMasterFaces, i)
770 label meshFacei = masterPatch.addressing()[cutToMasterFaces[i]];
772 masterCutFaces.insert(meshFacei);
775 DynamicList<label> workFace(100);
777 forAll(from0ToAllFaces, face0)
779 if (!masterCutFaces.found(face0))
781 label allFacei = from0ToAllFaces[face0];
786 masterPatch.meshPointMap(),
787 coupleInfo.masterToCutPoints(),
788 mesh0.faces()[face0],
799 forAll(cutToSlaveFaces, i)
801 label meshFacei = slavePatch.addressing()[cutToSlaveFaces[i]];
803 slaveCutFaces.insert(meshFacei);
806 forAll(from1ToAllFaces, face1)
808 if (!slaveCutFaces.found(face1))
810 label allFacei = from1ToAllFaces[face1];
815 slavePatch.meshPointMap(),
816 coupleInfo.slaveToCutPoints(),
817 mesh1.faces()[face1],
832 from1ToAllCells.setSize(mesh1.nCells());
833 from1ToAllCells = -1;
837 from1ToAllCells[i] = i + mesh0.nCells();
841 nCells = mesh0.nCells() + mesh1.nCells();
843 primitiveMesh::calcCells(allCells, allOwner, allNeighbour, nCells);
865 void Foam::polyMeshAdder::mergePointZones
867 const label nAllPoints,
873 DynamicList<word>& zoneNames,
875 List<DynamicList<label>>& pzPoints
878 zoneNames.setCapacity(pz0.size() + pz1.size());
879 zoneNames.append(pz0.names());
881 from1ToAll.setSize(pz1.size());
885 from1ToAll[zoneI] = zoneIndex(pz1[zoneI].
name(), zoneNames);
901 const pointZone& pz = pz0[zoneI];
905 label point0 = pz[i];
906 label allPointi = from0ToAllPoints[point0];
908 if (pointToZone[allPointi] == -1)
910 pointToZone[allPointi] = zoneI;
912 else if (pointToZone[allPointi] != zoneI)
914 labelList& pZones = addPointToZones[allPointi];
926 const pointZone& pz = pz1[zoneI];
927 const label allZoneI = from1ToAll[zoneI];
931 label point1 = pz[i];
932 label allPointi = from1ToAllPoints[point1];
934 if (pointToZone[allPointi] == -1)
936 pointToZone[allPointi] = allZoneI;
938 else if (pointToZone[allPointi] != allZoneI)
940 labelList& pZones = addPointToZones[allPointi];
953 forAll(pointToZone, allPointi)
955 label zoneI = pointToZone[allPointi];
961 forAll(addPointToZones, allPointi)
963 const labelList& pZones = addPointToZones[allPointi];
971 pzPoints.setSize(zoneNames.size());
974 pzPoints[zoneI].setCapacity(
nPoints[zoneI]);
976 forAll(pointToZone, allPointi)
978 label zoneI = pointToZone[allPointi];
981 pzPoints[zoneI].append(allPointi);
984 forAll(addPointToZones, allPointi)
986 const labelList& pZones = addPointToZones[allPointi];
989 pzPoints[pZones[i]].append(allPointi);
994 pzPoints[i].shrink();
1000 void Foam::polyMeshAdder::mergeFaceZones
1004 const polyMesh& mesh0,
1005 const polyMesh& mesh1,
1012 DynamicList<word>& zoneNames,
1014 List<DynamicList<label>>& fzFaces,
1015 List<DynamicList<bool>>& fzFlips
1019 const labelList& owner0 = mesh0.faceOwner();
1021 const labelList& owner1 = mesh1.faceOwner();
1024 zoneNames.setCapacity(fz0.size() + fz1.size());
1025 zoneNames.
append(fz0.names());
1027 from1ToAll.setSize(fz1.size());
1031 from1ToAll[zoneI] = zoneIndex(fz1[zoneI].
name(), zoneNames);
1037 labelList faceToZone(allOwner.size(), -1);
1039 boolList faceToFlip(allOwner.size(),
false);
1045 const labelList& addressing = fz0[zoneI];
1046 const boolList& flipMap = fz0[zoneI].flipMap();
1050 label face0 = addressing[i];
1051 bool flip0 = flipMap[i];
1053 label allFacei = from0ToAllFaces[face0];
1057 label allCell0 = owner0[face0];
1058 if (allOwner[allFacei] != allCell0)
1063 if (faceToZone[allFacei] == -1)
1065 faceToZone[allFacei] = zoneI;
1066 faceToFlip[allFacei] = flip0;
1068 else if (faceToZone[allFacei] != zoneI)
1070 labelList& fZones = addFaceToZones[allFacei];
1071 boolList& flipZones = addFaceToFlips[allFacei];
1076 flipZones.append(flip0);
1086 const labelList& addressing = fz1[zoneI];
1087 const boolList& flipMap = fz1[zoneI].flipMap();
1089 const label allZoneI = from1ToAll[zoneI];
1093 label face1 = addressing[i];
1094 bool flip1 = flipMap[i];
1096 label allFacei = from1ToAllFaces[face1];
1100 label allCell1 = from1ToAllCells[owner1[face1]];
1101 if (allOwner[allFacei] != allCell1)
1106 if (faceToZone[allFacei] == -1)
1108 faceToZone[allFacei] = allZoneI;
1109 faceToFlip[allFacei] = flip1;
1111 else if (faceToZone[allFacei] != allZoneI)
1113 labelList& fZones = addFaceToZones[allFacei];
1114 boolList& flipZones = addFaceToFlips[allFacei];
1119 flipZones.append(flip1);
1131 forAll(faceToZone, allFacei)
1133 label zoneI = faceToZone[allFacei];
1139 forAll(addFaceToZones, allFacei)
1141 const labelList& fZones = addFaceToZones[allFacei];
1144 nFaces[fZones[i]]++;
1149 fzFaces.setSize(zoneNames.size());
1150 fzFlips.setSize(zoneNames.size());
1153 fzFaces[zoneI].setCapacity(nFaces[zoneI]);
1154 fzFlips[zoneI].setCapacity(nFaces[zoneI]);
1156 forAll(faceToZone, allFacei)
1158 label zoneI = faceToZone[allFacei];
1159 bool flip = faceToFlip[allFacei];
1162 fzFaces[zoneI].append(allFacei);
1163 fzFlips[zoneI].append(flip);
1166 forAll(addFaceToZones, allFacei)
1168 const labelList& fZones = addFaceToZones[allFacei];
1169 const boolList& flipZones = addFaceToFlips[allFacei];
1173 label zoneI = fZones[i];
1174 fzFaces[zoneI].append(allFacei);
1175 fzFlips[zoneI].append(flipZones[i]);
1181 fzFaces[i].shrink();
1182 fzFlips[i].shrink();
1186 fzFaces[i] = UIndirectList<label>(fzFaces[i], order)();
1187 fzFlips[i] = UIndirectList<bool>(fzFlips[i], order)();
1192 void Foam::polyMeshAdder::mergeCellZones
1194 const label nAllCells,
1200 DynamicList<word>& zoneNames,
1202 List<DynamicList<label>>& czCells
1205 zoneNames.setCapacity(cz0.size() + cz1.size());
1206 zoneNames.append(cz0.names());
1208 from1ToAll.setSize(cz1.size());
1211 from1ToAll[zoneI] = zoneIndex(cz1[zoneI].
name(), zoneNames);
1226 const cellZone& cz = cz0[zoneI];
1229 label cell0 = cz[i];
1231 if (cellToZone[cell0] == -1)
1233 cellToZone[cell0] = zoneI;
1235 else if (cellToZone[cell0] != zoneI)
1237 labelList& cZones = addCellToZones[cell0];
1249 const cellZone& cz = cz1[zoneI];
1250 const label allZoneI = from1ToAll[zoneI];
1253 label cell1 = cz[i];
1254 label allCelli = from1ToAllCells[cell1];
1256 if (cellToZone[allCelli] == -1)
1258 cellToZone[allCelli] = allZoneI;
1260 else if (cellToZone[allCelli] != allZoneI)
1262 labelList& cZones = addCellToZones[allCelli];
1275 forAll(cellToZone, allCelli)
1277 label zoneI = cellToZone[allCelli];
1283 forAll(addCellToZones, allCelli)
1285 const labelList& cZones = addCellToZones[allCelli];
1288 nCells[cZones[i]]++;
1293 czCells.setSize(zoneNames.size());
1296 czCells[zoneI].setCapacity(nCells[zoneI]);
1298 forAll(cellToZone, allCelli)
1300 label zoneI = cellToZone[allCelli];
1303 czCells[zoneI].append(allCelli);
1306 forAll(addCellToZones, allCelli)
1308 const labelList& cZones = addCellToZones[allCelli];
1311 czCells[cZones[i]].append(allCelli);
1316 czCells[i].shrink();
1322 void Foam::polyMeshAdder::mergeZones
1324 const label nAllPoints,
1326 const label nAllCells,
1328 const polyMesh& mesh0,
1329 const polyMesh& mesh1,
1337 DynamicList<word>& pointZoneNames,
1338 List<DynamicList<label>>& pzPoints,
1340 DynamicList<word>& faceZoneNames,
1341 List<DynamicList<label>>& fzFaces,
1342 List<DynamicList<bool>>& fzFlips,
1344 DynamicList<word>& cellZoneNames,
1345 List<DynamicList<label>>& czCells
1393 void Foam::polyMeshAdder::addZones
1395 const DynamicList<word>& pointZoneNames,
1396 const List<DynamicList<label>>& pzPoints,
1398 const DynamicList<word>& faceZoneNames,
1399 const List<DynamicList<label>>& fzFaces,
1400 const List<DynamicList<bool>>& fzFlips,
1402 const DynamicList<word>& cellZoneNames,
1403 const List<DynamicList<label>>& czCells,
1408 List<pointZone*>
pZones(pzPoints.size());
1411 pZones[i] =
new pointZone
1420 List<faceZone*> fZones(fzFaces.size());
1423 fZones[i] =
new faceZone
1433 List<cellZone*> cZones(czCells.size());
1436 cZones[i] =
new cellZone
1479 labelList fromAllTo1Patches(allPatchNames.size(), -1);
1501 label nInternalFaces;
1509 labelList nFaces(allPatchNames.size(), 0);
1524 allPatchNames.size(),
1599 allPatchNames.
size(),
1601 mesh0.nInternalFaces()
1602 + mesh1.nInternalFaces()
1637 getPatchSizes(patches0),
1638 getPatchStarts(patches0)
1689 const bool validBoundary
1700 labelList fromAllTo1Patches(allPatchNames.size(), -1);
1724 label nInternalFaces;
1726 labelList nFaces(allPatchNames.size(), 0);
1741 allPatchNames.size(),
1808 labelList mesh0PatchSizes(getPatchSizes(patches0));
1809 labelList mesh0PatchStarts(getPatchStarts(patches0));
1818 allPatches.
setSize(allPatchNames.size());
1819 labelList patchSizes(allPatches.size());
1820 labelList patchStarts(allPatches.size());
1822 label startFacei = nInternalFaces;
1826 label allPatchi = 0;
1828 forAll(from0ToAllPatches, patch0)
1833 if (nFaces[patch0] == 0 && isA<processorPolyPatch>(allPatches[patch0]))
1837 from0ToAllPatches[patch0] = -1;
1839 if (fromAllTo1Patches[patch0] != -1)
1841 from1ToAllPatches[fromAllTo1Patches[patch0]] = -1;
1852 allPatches[patch0].clone
1860 patchSizes[allPatchi] = nFaces[patch0];
1861 patchStarts[allPatchi] = startFacei;
1864 from0ToAllPatches[patch0] = allPatchi;
1867 if (fromAllTo1Patches[patch0] != -1)
1869 from1ToAllPatches[fromAllTo1Patches[patch0]] = allPatchi;
1872 startFacei += nFaces[patch0];
1879 forAll(from1ToAllPatches, patch1)
1881 label uncompactAllPatchi = from1ToAllPatches[patch1];
1883 if (uncompactAllPatchi >= from0ToAllPatches.size())
1889 nFaces[uncompactAllPatchi] == 0
1890 && isA<processorPolyPatch>(patches1[patch1])
1895 from1ToAllPatches[patch1] = -1;
1903 patches1[patch1].clone
1911 patchSizes[allPatchi] = nFaces[uncompactAllPatchi];
1912 patchStarts[allPatchi] = startFacei;
1915 from1ToAllPatches[patch1] = allPatchi;
1917 startFacei += nFaces[uncompactAllPatchi];
1924 allPatches.setSize(allPatchi);
1925 patchSizes.setSize(allPatchi);
1926 patchStarts.setSize(allPatchi);
1965 mesh0.resetMotion();
1966 mesh0.resetPrimitives
1978 mesh0.pointZones().
clear();
1979 mesh0.faceZones().clear();
1980 mesh0.cellZones().clear();
2002 const scalar mergeDist
2017 label nMultiple = 0;
2019 forAll(sharedPointLabels, i)
2021 label pointi = sharedPointLabels[i];
2023 label sharedI = sharedPointAddr[i];
2027 if (iter != sharedToMesh.end())
2033 labelList& connectedPointLabels = iter();
2038 if (
findIndex(connectedPointLabels, pointi) != -1)
2041 <<
"Duplicate point in sharedPoint addressing." <<
endl 2042 <<
"When trying to add point " << pointi <<
" on shared " 2043 << sharedI <<
" with connected points " 2044 << connectedPointLabels
2048 connectedPointLabels.
setSize(sz+1);
2049 connectedPointLabels[sz] = pointi;
2053 sharedToMesh.insert(sharedI,
labelList(1, pointi));
2065 const labelList& connectedPointLabels = iter();
2072 if (connectedPointLabels.
size() > 1)
2077 connectedPointLabels
2089 if (nUnique < connectedPoints.size())
2104 const labelList& mergeSet = mergeSets[setI];
2106 if (mergeSet.
size() > 1)
2113 label pointi = connectedPointLabels[mergeSet[i]];
2115 masterPointi =
min(masterPointi, pointi);
2120 label pointi = connectedPointLabels[mergeSet[i]];
2129 pointToMaster.
insert(pointi, masterPointi);
2207 return pointToMaster;
2223 if (iter != pointToMaster.
end())
2225 if (iter() != pointi)
2238 const face&
f = faces[facei];
2240 bool hasMerged =
false;
2244 label pointi = f[fp];
2248 if (iter != pointToMaster.
end())
2250 if (iter() != pointi)
2264 label pointi = f[fp];
2268 if (iter != pointToMaster.
end())
2277 bool zoneFlip =
false;
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
List< labelList > labelListList
A List of labelList.
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with the type faceZone.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< List< bool > > boolListList
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
const boolList & flipMap() const
Return face flip map.
Class describing modification of a face.
A face is a list of labels corresponding to mesh vertices.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelListList invertOneToMany(const label len, const labelUList &)
Invert one-to-many map. Unmapped elements will be size 0.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Class containing mesh-to-mesh mapping information after a mesh addition where we add a mesh ('added m...
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
HashTable< label, label, Hash< label > >::const_iterator const_iterator
void removePoint(const label, const label)
Remove/merge point.
PrimitivePatch< face, IndirectList, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
Container for information needed to couple to meshes. When constructed from two meshes and a geometri...
List< bool > boolList
Bool container classes.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
An STL-conforming iterator.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
void clear()
Delete object (if the pointer is valid) and set pointer to NULL.
vectorField pointField
pointField is a vectorField.
void reset(T *=0)
If object pointer already set, delete object and set to given.
static void mergePoints(const polyMesh &, const Map< label > &pointToMaster, polyTopoChange &meshMod)
Helper: Merge points.
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
friend class const_iterator
Declare friendship with the const_iterator.
void append(const T &)
Append an element at the end of the list.
static const label labelMax
List< label > labelList
A List of labels.
ZoneMesh< pointZone, polyMesh > pointZoneMesh
A ZoneMesh with the type pointZone.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
const globalMeshData & globalData() const
Return parallel info.
prefixOSstream Pout(cout,"Pout")
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
void addPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches.
const primitiveFacePatch & cutFaces() const
Addressing engine for combined set of faces.
void setSize(const label)
Reset size of List.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
Direct mesh changes based on v1.3 polyTopoChange syntax.
label mergePoints(const UList< Type > &points, const scalar mergeTol, const bool verbose, labelList &pointMap, const Type &origin=Type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.
const faceZoneMesh & faceZones() const
Return face zone mesh.
HashTable< labelList, edge, Hash< edge > > edgeLookup
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
A subset of mesh faces organised as a primitive patch.
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
void stableSort(UList< T > &)
static autoPtr< polyMesh > add(const IOobject &io, const polyMesh &mesh0, const polyMesh &mesh1, const faceCoupleInfo &coupleInfo, autoPtr< mapAddedPolyMesh > &mapPtr)
Add two polyMeshes. Returns new polyMesh and map construct.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
List< cell > cellList
list of cells
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with the type cellZone.
static Map< label > findSharedPoints(const polyMesh &, const scalar mergeTol)
Find topologically and geometrically shared points.
IOporosityModelList pZones(mesh)
label size() const
Return the number of elements in the UPtrList.
A HashTable to objects of type <T> with a label key.
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.