69 referPatchID_(referPatchID)
74 if (nbrProc_[a] < nbrProc_[
b])
78 else if (nbrProc_[a] > nbrProc_[
b])
85 return referPatchID_[a] < referPatchID_[
b];
94void Foam::fvMeshDistribute::inplaceRenumberWithFlip
96 const labelUList& oldToNew,
97 const bool oldToNewHasFlip,
98 const bool lstHasFlip,
102 if (!lstHasFlip && !oldToNewHasFlip)
113 label val = lst[elemI];
129 <<
"Problem : zero value " << val
130 <<
" at index " << elemI <<
" out of " << lst.size()
137 label newVal = oldToNew[val];
153 <<
"Problem : zero value " << newVal
154 <<
" at index " << elemI <<
" out of "
162 lst[elemI] =
sign*(newVal+1);
170 const bool selectEqual,
179 if (selectEqual == (values[i] == value))
190 if (selectEqual == (values[i] == value))
210 mergedNames = procNames;
215 mergedNames.push_uniq(
name);
227 Pout<<
"Primitives:" <<
nl
228 <<
" points :" <<
mesh.nPoints() <<
nl
230 <<
" internalFaces:" <<
mesh.nInternalFaces() <<
nl
231 <<
" faces :" <<
mesh.nFaces() <<
nl
232 <<
" cells :" <<
mesh.nCells() <<
nl;
237 Pout<<
" " <<
pp.index() <<
" name:" <<
pp.name()
238 <<
" size:" <<
pp.size()
239 <<
" start:" <<
pp.start()
240 <<
" type:" <<
pp.type()
244 if (
mesh.pointZones().empty())
Pout<<
"PointZones:" <<
endl;
245 for (
const auto& zn :
mesh.pointZones())
247 Pout<<
" " << zn.index() <<
" name:" << zn.
name()
248 <<
" size:" << zn.size() <<
endl;
254 Pout<<
" " << zn.index() <<
" name:" << zn.name()
255 <<
" size:" << zn.size() <<
endl;
261 Pout<<
" " << zn.index() <<
" name:" << zn.name()
262 <<
" size:" << zn.size() <<
endl;
269 const primitiveMesh&
mesh,
277 <<
"Current coupling info:"
280 forAll(sourceFace, bFacei)
282 label meshFacei =
mesh.nInternalFaces() + bFacei;
284 Pout<<
" meshFace:" << meshFacei
285 <<
" fc:" <<
mesh.faceCentres()[meshFacei]
286 <<
" connects to proc:" << sourceProc[bFacei]
287 <<
"/face:" << sourceFace[bFacei]
288 <<
" which will move to proc:" << sourceNewNbrProc[bFacei]
294Foam::label Foam::fvMeshDistribute::findNonEmptyPatch()
const
312 isCoupledPatch.set(patchi);
313 const label dupPatchID = cpp->nonOverlapPatchID();
314 if (dupPatchID != -1)
316 isCoupledPatch.set(dupPatchID);
319 else if (
pp.coupled())
321 isCoupledPatch.set(patchi);
325 label nonEmptyPatchi = -1;
334 && !isCoupledPatch(patchi)
338 nonEmptyPatchi = patchi;
343 if (nonEmptyPatchi == -1)
346 <<
"Cannot find a patch which is not of type empty, mapped or"
348 <<
"There has to be at least one such patch for"
354 Pout<<
"findNonEmptyPatch : using patch " << nonEmptyPatchi
356 <<
" type:" <<
patches[nonEmptyPatchi].type()
357 <<
" to put exposed faces into." <<
endl;
363 label procPatchi = -1;
371 else if (procPatchi != -1)
374 <<
"Processor patches should be at end of patch list."
376 <<
"Have processor patch " << procPatchi
377 <<
" followed by non-processor patch " << patchi
383 return nonEmptyPatchi;
401 mesh.time().timeName(),
416 fld[facei] = (
n[facei] & testNormal);
429 newPfld[i] = (nBf[patchi][i] & testNormal);
448 scalar
cos = (
n[facei] & testNormal);
454 <<
"On internal face " << facei <<
" at "
455 <<
mesh.faceCentres()[facei]
456 <<
" the field value is " <<
fld[facei]
457 <<
" whereas cos angle of " << testNormal
458 <<
" with mesh normal " <<
n[facei]
471 scalar
cos = (np[i] & testNormal);
475 label facei = fvp.patch().start()+i;
478 <<
"On face " << facei
479 <<
" on patch " << fvp.patch().name()
480 <<
" at " <<
mesh.faceCentres()[facei]
481 <<
" the field value is " << fvp[i]
482 <<
" whereas cos angle of " << testNormal
483 <<
" with mesh normal " << np[i]
493Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches
495 const label destinationPatch
503 labelList newPatchID(mesh_.nBoundaryFaces(), -1);
511 Pout<<
"Moving all faces of patch " <<
pp.name()
512 <<
" into patch " << destinationPatch
521 ) = destinationPatch;
537 forAll(mesh_.boundaryMesh(), patchi)
541 oldToNew[patchi] = newi++;
544 label nNonProcPatches = newi;
547 forAll(mesh_.boundaryMesh(), patchi)
551 oldToNew[patchi] = newi++;
561Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
569 forAll(newPatchID, bFacei)
571 if (newPatchID[bFacei] != -1)
573 label facei = mesh_.nInternalFaces() + bFacei;
575 label zoneID = mesh_.faceZones().whichZone(facei);
576 bool zoneFlip =
false;
580 const faceZone& fZone = mesh_.faceZones()[zoneID];
581 zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
588 mesh_.faces()[facei],
590 mesh_.faceOwner()[facei],
608 saveBoundaryFields<scalar, surfaceMesh>(sFlds);
610 saveBoundaryFields<vector, surfaceMesh>(vFlds);
612 saveBoundaryFields<sphericalTensor, surfaceMesh>(sptFlds);
614 saveBoundaryFields<symmTensor, surfaceMesh>(sytFlds);
616 saveBoundaryFields<tensor, surfaceMesh>(tFlds);
627 const bool oldMoving = mesh_.moving(
false);
629 mesh_.moving(oldMoving);
634 mesh_.updateMesh(map);
638 mapBoundaryFields<scalar, surfaceMesh>(map, sFlds);
639 mapBoundaryFields<vector, surfaceMesh>(map, vFlds);
640 mapBoundaryFields<sphericalTensor, surfaceMesh>(map, sptFlds);
641 mapBoundaryFields<symmTensor, surfaceMesh>(map, sytFlds);
642 mapBoundaryFields<tensor, surfaceMesh>(map, tFlds);
646 if (map.hasMotionPoints())
648 mesh_.movePoints(map.preMotionPoints());
655 label index = map.reverseFaceMap().find(-1);
660 <<
"reverseFaceMap contains -1 at index:"
662 <<
"This means that the repatch operation was not just"
667 forAll(constructFaceMap, proci)
669 inplaceRenumberWithFlip
671 map.reverseFaceMap(),
674 constructFaceMap[proci]
687Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
697 forAll(pointToGlobalMaster, pointi)
699 if (pointToGlobalMaster[pointi] != -1)
707 Pout<<
"mergeSharedPoints : found " << nShared
708 <<
" points on processor boundaries" <<
nl <<
endl;
711 Map<label> globalMasterToLocalMaster(2*nShared);
715 forAll(pointToGlobalMaster, pointi)
717 label globali = pointToGlobalMaster[pointi];
720 const auto iter = globalMasterToLocalMaster.cfind(globali);
725 pointToMaster.insert(pointi, *iter);
731 globalMasterToLocalMaster.insert(globali, pointi);
732 pointToMaster.insert(pointi, pointi);
741 Pout<<
"mergeSharedPoints : found "
742 << nMatch <<
" mergeable points" <<
nl <<
endl;
760 const bool oldMoving = mesh_.moving(
false);
762 mesh_.moving(oldMoving);
766 mesh_.updateMesh(map);
769 forAll(constructPointMap, proci)
771 labelList& constructMap = constructPointMap[proci];
775 label oldPointi = constructMap[i];
777 label
newPointi = map.reversePointMap()[oldPointi];
790 <<
"Problem. oldPointi:" << oldPointi
800void Foam::fvMeshDistribute::getCouplingData
813 const label nBnd = mesh_.nBoundaryFaces();
814 sourceFace.setSize(nBnd);
815 sourceProc.setSize(nBnd);
816 sourcePatch.setSize(nBnd);
817 sourceNewNbrProc.setSize(nBnd);
831 label offset =
pp.start() - mesh_.nInternalFaces();
836 label bndI = offset + i;
837 nbrFaces[bndI] =
pp.start()+i;
855 label offset =
pp.start() - mesh_.nInternalFaces();
864 if (procPatch.owner())
869 label bndI = offset + i;
870 sourceFace[bndI] =
pp.start()+i;
872 sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
880 label bndI = offset + i;
881 sourceFace[bndI] = nbrFaces[bndI];
882 sourceProc[bndI] = procPatch.neighbProcNo();
883 sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
899 label bndI = offset + i;
900 sourcePatch[bndI] = patchi;
911 label bndI = offset + i;
912 sourceFace[bndI] =
pp.start()+i;
914 sourcePatch[bndI] = patchi;
915 sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
922 label bndI = offset + i;
923 sourceFace[bndI] = nbrFaces[bndI];
925 sourcePatch[bndI] = patchi;
926 sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
935 label bndI = offset + i;
936 sourceFace[bndI] = -1;
937 sourceProc[bndI] = -1;
938 sourcePatch[bndI] = patchi;
939 sourceNewNbrProc[bndI] = -1;
946 sourcePointMaster.resize_nocopy(mesh_.nPoints());
947 sourcePointMaster = -1;
954 const labelList& meshPoints = cpp.meshPoints();
955 const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap();
958 labelList elems(slavesMap.constructSize(), -1);
959 forAll(meshPoints, pointi)
967 label globalPointi =
globalPoints.toGlobal(meshPoints[pointi]);
968 elems[pointi] = globalPointi;
971 label sloti = slots[i];
972 if (sloti >= meshPoints.size())
976 elems[slots[i]] = globalPointi;
983 slavesMap.reverseDistribute(elems.size(), elems,
false);
986 forAll(meshPoints, pointi)
988 sourcePointMaster[meshPoints[pointi]] = elems[pointi];
995void Foam::fvMeshDistribute::subsetCouplingData
1005 const label oldInternalFaces,
1025 forAll(subFace, newBFacei)
1029 label oldFacei =
faceMap[newFacei];
1032 if (oldFacei < oldInternalFaces)
1034 subFace[newBFacei] = oldFacei;
1036 subPatch[newBFacei] = -1;
1038 label oldOwn = oldFaceOwner[oldFacei];
1039 label oldNei = oldFaceNeighbour[oldFacei];
1044 subNewNbrProc[newBFacei] = oldDistribution[oldNei];
1049 subNewNbrProc[newBFacei] = oldDistribution[oldOwn];
1055 label oldBFacei = oldFacei - oldInternalFaces;
1057 subFace[newBFacei] = sourceFace[oldBFacei];
1058 subProc[newBFacei] = sourceProc[oldBFacei];
1059 subPatch[newBFacei] = sourcePatch[oldBFacei];
1060 subNewNbrProc[newBFacei] = sourceNewNbrProc[oldBFacei];
1071void Foam::fvMeshDistribute::findCouples
1092 forAll(domainProc, bFacei)
1094 if (domainProc[bFacei] != -1 && domainPatch[bFacei] == -1)
1098 labelPair(domainFace[bFacei], domainProc[bFacei]),
1107 masterCoupledFaces.setSize(domainFace.size());
1108 slaveCoupledFaces.setSize(domainFace.size());
1111 forAll(sourceFace, bFacei)
1113 if (sourceProc[bFacei] != -1 && sourcePatch[bFacei] == -1)
1115 labelPair myData(sourceFace[bFacei], sourceProc[bFacei]);
1117 const auto iter = map.cfind(myData);
1121 label nbrBFacei = *iter;
1124 slaveCoupledFaces[coupledI] =
1125 domainMesh.nInternalFaces()
1133 masterCoupledFaces.setSize(coupledI);
1134 slaveCoupledFaces.setSize(coupledI);
1138 Pout<<
"findCouples : found " << coupledI
1139 <<
" faces that will be stitched" <<
nl <<
endl;
1144void Foam::fvMeshDistribute::findCouples
1165 const labelList& domainProc = domainSourceProcs[meshi];
1166 const labelList& domainPatch = domainSourcePatchs[meshi];
1168 forAll(domainProc, bFacei)
1170 if (domainProc[bFacei] != -1 && domainPatch[bFacei] == -1)
1172 nProcFaces[meshi]++;
1180 Pout<<
"fvMeshDistribute::findCouples : nProcFaces:"
1194 dynLocalFace[meshi].reserve(nProcFaces[meshi]);
1195 dynRemoteProc[meshi].reserve(nProcFaces[meshi]);
1196 dynRemoteFace[meshi].reserve(nProcFaces[meshi]);
1210 const labelList& domainFace = domainSourceFaces[meshi];
1211 const labelList& domainProc = domainSourceProcs[meshi];
1212 const labelList& domainPatch = domainSourcePatchs[meshi];
1214 forAll(domainProc, bFacei)
1216 if (domainProc[bFacei] != -1 && domainPatch[bFacei] == -1)
1223 auto fnd = map.find(key);
1228 map.emplace(key, meshi, bFacei);
1233 const label matchProci = fnd().first();
1234 const label matchFacei = fnd().second();
1236 dynLocalFace[meshi].append(bFacei);
1237 dynRemoteProc[meshi].append(matchProci);
1238 dynRemoteFace[meshi].append(matchFacei);
1239 nProcFaces[meshi]++;
1241 dynLocalFace[matchProci].append(matchFacei);
1242 dynRemoteProc[matchProci].append(meshi);
1243 dynRemoteFace[matchProci].append(bFacei);
1244 nProcFaces[matchProci]++;
1253 Pout<<
"fvMeshDistribute::findCouples : stored procFaces:"
1254 << map.size() <<
endl;
1264 localBoundaryFace[meshi] = std::move(dynLocalFace[meshi]);
1265 remoteFaceProc[meshi] = std::move(dynRemoteProc[meshi]);
1266 remoteBoundaryFace[meshi] = std::move(dynRemoteFace[meshi]);
1273 Pout<<
"fvMeshDistribute::findCouples : found matches:"
1285 const label nInternalFaces1,
1291 forAll(boundaryData0, oldBFacei)
1293 label newFacei = map.oldFaceMap()[oldBFacei + map.nOldInternalFaces()];
1299 boundaryData0[oldBFacei];
1303 forAll(boundaryData1, addedBFacei)
1305 label newFacei = map.addedFaceMap()[addedBFacei + nInternalFaces1];
1310 boundaryData1[addedBFacei];
1314 return newBoundaryData;
1328 forAll(boundaryData0, oldPointi)
1330 label
newPointi = map.oldPointMap()[oldPointi];
1335 newBoundaryData[
newPointi] = boundaryData0[oldPointi];
1339 forAll(boundaryData1, addedPointi)
1341 label
newPointi = map.addedPointMap()[addedPointi];
1345 newBoundaryData[
newPointi] = boundaryData1[addedPointi];
1349 return newBoundaryData;
1354Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells
1357 const label oldInternalPatchi
1368 labelList exposedFaces(cellRemover.getExposedFaces(cellsToRemove));
1371 cellRemover.setRefinement
1375 labelList(exposedFaces.size(), oldInternalPatchi),
1387 saveInternalFields(sFlds);
1389 saveInternalFields(vFlds);
1391 saveInternalFields(sptFlds);
1393 saveInternalFields(sytFlds);
1395 saveInternalFields(tFlds);
1401 const bool oldMoving = mesh_.moving(
false);
1403 mesh_.moving(oldMoving);
1406 mesh_.updateMesh(map());
1413 mapExposedFaces(map(), sFlds);
1414 mapExposedFaces(map(), vFlds);
1415 mapExposedFaces(map(), sptFlds);
1416 mapExposedFaces(map(), sytFlds);
1417 mapExposedFaces(map(), tFlds);
1425 if (map().hasMotionPoints())
1427 mesh_.movePoints(map().preMotionPoints());
1437void Foam::fvMeshDistribute::addProcPatches
1459 label bFacei = indices[i];
1460 label proci = nbrProc[bFacei];
1464 if (!procPatchID[proci].
found(referPatchID[bFacei]))
1469 if (referPatchID[bFacei] == -1)
1477 mesh_.boundaryMesh().size(),
1478 mesh_.boundaryMesh(),
1483 procPatchID[proci].insert
1485 referPatchID[bFacei],
1501 mesh_.boundaryMesh()[referPatchID[bFacei]]
1507 mesh_.boundaryMesh().size(),
1508 mesh_.boundaryMesh(),
1515 procPatchID[proci].insert
1517 referPatchID[bFacei],
1548 label origPatchi = referPatchID[bFacei];
1551 else if (nbrProc[bFacei] != -1)
1553 label origPatchi = referPatchID[bFacei];
1554 patchIDs[bFacei] = procPatchID[nbrProc[bFacei]][origPatchi];
1566void Foam::fvMeshDistribute::sendMesh
1585 Pout<<
"Sending to domain " << domain <<
nl
1601 forAll(pointZoneNames, nameI)
1603 label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]);
1607 rowSizes[nameI] = pointZones[myZoneID].size();
1612 forAll(pointZoneNames, nameI)
1614 label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]);
1618 zonePoints[nameI].deepCopy(pointZones[myZoneID]);
1631 forAll(faceZoneNames, nameI)
1633 label myZoneID = faceZones.findZoneID(faceZoneNames[nameI]);
1637 rowSizes[nameI] = faceZones[myZoneID].size();
1642 zoneFaceFlip.setSize(rowSizes);
1644 forAll(faceZoneNames, nameI)
1646 label myZoneID = faceZones.findZoneID(faceZoneNames[nameI]);
1650 zoneFaces[nameI].deepCopy(faceZones[myZoneID]);
1651 zoneFaceFlip[nameI].deepCopy(faceZones[myZoneID].flipMap());
1663 forAll(cellZoneNames, nameI)
1665 label myZoneID = cellZones.findZoneID(cellZoneNames[nameI]);
1669 rowSizes[nameI] = cellZones[myZoneID].size();
1675 forAll(cellZoneNames, nameI)
1677 label myZoneID = cellZones.findZoneID(cellZoneNames[nameI]);
1681 zoneCells[nameI].deepCopy(cellZones[myZoneID]);
1718 << sourcePointMaster;
1723 Pout<<
"Started sending mesh to domain " << domain
1730Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
1760 >> domainSourcePatch
1761 >> domainSourceNewNbrProc
1762 >> domainSourcePointMaster;
1774 std::move(domainPoints),
1775 std::move(domainFaces),
1776 std::move(domainAllOwner),
1777 std::move(domainAllNeighbour),
1780 fvMesh& domainMesh = *domainMeshPtr;
1784 forAll(patchEntries, patchi)
1791 patchEntries[patchi].keyword(),
1792 patchEntries[patchi].
dict(),
1794 domainMesh.boundaryMesh()
1799 domainMesh.addFvPatches(
patches,
false);
1810 domainMesh.pointZones()
1823 domainMesh.faceZones()
1835 domainMesh.cellZones()
1838 domainMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
1840 return domainMeshPtr;
1846Foam::fvMeshDistribute::fvMeshDistribute(
fvMesh&
mesh)
1869 <<
"At index " << celli <<
" distribution:" << newProc
1884 if (distribution.size() != mesh_.nCells())
1887 <<
"Size of distribution:"
1888 << distribution.size() <<
" mesh nCells:" << mesh_.nCells()
1899 <<
"This application requires all non-processor patches"
1900 <<
" to be present in the same order on all patches" <<
nl
1901 <<
"followed by the processor patches (which of course are unique)."
1903 <<
"Local patches:" << mesh_.boundaryMesh().names()
1908 const label nOldPoints(mesh_.nPoints());
1909 const label nOldFaces(mesh_.nFaces());
1910 const label nOldCells(mesh_.nCells());
1916 oldPatchNMeshPoints[patchi] =
patches[patchi].nPoints();
1932 std::move(oldPatchStarts),
1933 std::move(oldPatchNMeshPoints),
1951 const wordList pointZoneNames(mergeWordList(mesh_.pointZones().names()));
1952 reorderZones(pointZoneNames, mesh_.pointZones());
1954 const wordList faceZoneNames(mergeWordList(mesh_.faceZones().names()));
1955 reorderZones(faceZoneNames, mesh_.faceZones());
1957 const wordList cellZoneNames(mergeWordList(mesh_.cellZones().names()));
1958 reorderZones(cellZoneNames, mesh_.cellZones());
2028 mesh_.resetMotion();
2034 getFieldNames<volScalarField>(mesh_, allFieldNames);
2035 getFieldNames<volVectorField>(mesh_, allFieldNames);
2036 getFieldNames<volSphericalTensorField>(mesh_, allFieldNames);
2037 getFieldNames<volSymmTensorField>(mesh_, allFieldNames);
2038 getFieldNames<volTensorField>(mesh_, allFieldNames);
2040 getFieldNames<surfaceScalarField>(mesh_, allFieldNames);
2041 getFieldNames<surfaceVectorField>(mesh_, allFieldNames);
2042 getFieldNames<surfaceSphericalTensorField>(mesh_, allFieldNames);
2043 getFieldNames<surfaceSymmTensorField>(mesh_, allFieldNames);
2044 getFieldNames<surfaceTensorField>(mesh_, allFieldNames);
2046 getFieldNames<volScalarField::Internal>
2052 getFieldNames<volVectorField::Internal>
2058 getFieldNames<volSphericalTensorField::Internal>
2064 getFieldNames<volSymmTensorField::Internal>
2070 getFieldNames<volTensorField::Internal>
2079 const label oldInternalPatchi = findNonEmptyPatch();
2089 repatchFaceMap = repatchMap().faceMap();
2096 repatchMap().reverseFaceMap(),
2097 mesh_.nBoundaryFaces(),
2098 mesh_.nInternalFaces()
2100 - mesh_.nInternalFaces()
2114 Pout<<
nl <<
"MESH WITH PROC PATCHES DELETED:" <<
endl;
2115 printMeshInfo(mesh_);
2116 printFieldInfo<volScalarField>(mesh_);
2117 printFieldInfo<volVectorField>(mesh_);
2118 printFieldInfo<volSphericalTensorField>(mesh_);
2119 printFieldInfo<volSymmTensorField>(mesh_);
2120 printFieldInfo<volTensorField>(mesh_);
2121 printFieldInfo<surfaceScalarField>(mesh_);
2122 printFieldInfo<surfaceVectorField>(mesh_);
2123 printFieldInfo<surfaceSphericalTensorField>(mesh_);
2124 printFieldInfo<surfaceSymmTensorField>(mesh_);
2125 printFieldInfo<surfaceTensorField>(mesh_);
2126 printIntFieldInfo<volScalarField::Internal>(mesh_);
2127 printIntFieldInfo<volVectorField::Internal>(mesh_);
2128 printIntFieldInfo<volSphericalTensorField::Internal>(mesh_);
2129 printIntFieldInfo<volSymmTensorField::Internal>(mesh_);
2130 printIntFieldInfo<volTensorField::Internal>(mesh_);
2165 forAll(nSendCells, recvProc)
2174 <<
"SUBSETTING FOR DOMAIN " << recvProc
2175 <<
" cells to send:"
2176 << nSendCells[recvProc]
2193 subCellMap[recvProc] = subsetter.cellMap();
2194 subFaceMap[recvProc] = subsetter.faceFlipMap();
2195 inplaceRenumberWithFlip
2200 subFaceMap[recvProc]
2202 subPointMap[recvProc] = subsetter.pointMap();
2203 subPatchMap[recvProc] = subsetter.patchMap();
2215 subsetter.subMesh(),
2216 subsetter.pointMap(),
2217 subsetter.faceMap(),
2218 subsetter.cellMap(),
2222 mesh_.faceNeighbour(),
2223 mesh_.nInternalFaces(),
2234 procSourceNewNbrProc,
2235 procSourcePointMaster
2243 subsetter.subMesh(),
2252 procSourceNewNbrProc,
2253 procSourcePointMaster,
2259 sendFields<volScalarField>
2266 sendFields<volVectorField>
2273 sendFields<volSphericalTensorField>
2280 sendFields<volSymmTensorField>
2287 sendFields<volTensorField>
2296 sendFields<surfaceScalarField>
2303 sendFields<surfaceVectorField>
2310 sendFields<surfaceSphericalTensorField>
2317 sendFields<surfaceSymmTensorField>
2324 sendFields<surfaceTensorField>
2333 sendFields<volScalarField::Internal>
2340 sendFields<volVectorField::Internal>
2347 sendFields<volSphericalTensorField::Internal>
2354 sendFields<volSymmTensorField::Internal>
2361 sendFields<volTensorField::Internal>
2379 pBufs.finishedSends();
2383 Pout<<
"Finished sending and receiving : "
2393 const labelList oldFaceOwner(mesh_.faceOwner());
2394 const labelList oldFaceNeighbour(mesh_.faceNeighbour());
2395 const label oldInternalFaces = mesh_.nInternalFaces();
2421 for (
const label facei : flip)
2438 subMap().pointMap(),
2456 domainSourceNewNbrProc,
2457 domainSourcePointMaster
2460 sourceFace.transfer(domainSourceFace);
2461 sourceProc.transfer(domainSourceProc);
2462 sourcePatch.transfer(domainSourcePatch);
2463 sourceNewNbrProc.transfer(domainSourceNewNbrProc);
2464 sourcePointMaster.transfer(domainSourcePointMaster);
2472 printMeshInfo(mesh_);
2473 printFieldInfo<volScalarField>(mesh_);
2474 printFieldInfo<volVectorField>(mesh_);
2475 printFieldInfo<volSphericalTensorField>(mesh_);
2476 printFieldInfo<volSymmTensorField>(mesh_);
2477 printFieldInfo<volTensorField>(mesh_);
2478 printFieldInfo<surfaceScalarField>(mesh_);
2479 printFieldInfo<surfaceVectorField>(mesh_);
2480 printFieldInfo<surfaceSphericalTensorField>(mesh_);
2481 printFieldInfo<surfaceSymmTensorField>(mesh_);
2482 printFieldInfo<surfaceTensorField>(mesh_);
2483 printIntFieldInfo<volScalarField::Internal>(mesh_);
2484 printIntFieldInfo<volVectorField::Internal>(mesh_);
2485 printIntFieldInfo<volSphericalTensorField::Internal>(mesh_);
2486 printIntFieldInfo<volSymmTensorField::Internal>(mesh_);
2487 printIntFieldInfo<volTensorField::Internal>(mesh_);
2509 #define doLocalCode(FieldType, Variable) \
2510 PtrList<PtrList<FieldType>> Variable(UPstream::nProcs());
2533 forAll(nRecvCells, sendProc)
2541 <<
"RECEIVING FROM DOMAIN " << sendProc
2542 <<
" cells to receive:"
2543 << nRecvCells[sendProc]
2561 const_cast<Time&
>(mesh_.time()),
2564 domainSourceProcs.emplace_set(sendProc),
2565 domainSourcePatchs.emplace_set(sendProc),
2566 domainSourceNewNbrProcs.emplace_set(sendProc),
2567 domainSourcePointMasters.emplace_set(sendProc),
2570 domainMeshPtrs.set(sendProc, std::move(domainMeshPtr));
2571 fvMesh& domainMesh = domainMeshPtrs[sendProc];
2581 #define doLocalCode(FieldType, Variable) \
2582 receiveFields<FieldType> \
2587 Variable.emplace_set(sendProc), \
2624 forAll(domainMeshPtrs, proci)
2626 if (domainMeshPtrs.set(proci))
2628 meshes.
set(proci, &domainMeshPtrs[proci]);
2629 fvMeshes.
set(proci, &domainMeshPtrs[proci]);
2667 const label nOldInternalFaces = mesh_.nInternalFaces();
2668 const labelList oldFaceOwner(mesh_.faceOwner());
2672 const bool oldMoving = mesh_.moving(
false);
2691 mesh_.moving(oldMoving);
2697 printMeshInfo(mesh_);
2698 printFieldInfo<volScalarField>(mesh_);
2699 printFieldInfo<volVectorField>(mesh_);
2700 printFieldInfo<volSphericalTensorField>(mesh_);
2701 printFieldInfo<volSymmTensorField>(mesh_);
2702 printFieldInfo<volTensorField>(mesh_);
2703 printFieldInfo<surfaceScalarField>(mesh_);
2704 printFieldInfo<surfaceVectorField>(mesh_);
2705 printFieldInfo<surfaceSphericalTensorField>(mesh_);
2706 printFieldInfo<surfaceSymmTensorField>(mesh_);
2707 printFieldInfo<surfaceTensorField>(mesh_);
2708 printIntFieldInfo<volScalarField::Internal>(mesh_);
2709 printIntFieldInfo<volVectorField::Internal>(mesh_);
2710 printIntFieldInfo<volSphericalTensorField::Internal>(mesh_);
2711 printIntFieldInfo<volSymmTensorField::Internal>(mesh_);
2712 printIntFieldInfo<volTensorField::Internal>(mesh_);
2718 sourceProc.resize_nocopy(mesh_.nBoundaryFaces());
2720 sourcePatch.resize_nocopy(mesh_.nBoundaryFaces());
2722 sourceFace.resize_nocopy(mesh_.nBoundaryFaces());
2724 sourceNewNbrProc.resize_nocopy(mesh_.nBoundaryFaces());
2725 sourceNewNbrProc = -1;
2726 sourcePointMaster.resize_nocopy(mesh_.nPoints());
2727 sourcePointMaster = -1;
2729 if (mesh_.nPoints() > 0)
2733 if (domainSourceFaces.set(meshi))
2735 const label nIntFaces =
2739 :
meshes[meshi].nInternalFaces()
2745 :
meshes[meshi].faceOwner()
2749 const labelList& cellMap = constructCellMap[meshi];
2752 domainSourceFaces[meshi];
2754 domainSourceProcs[meshi];
2756 domainSourcePatchs[meshi];
2758 domainSourceNewNbrProcs[meshi];
2762 constructPointMap[meshi]
2763 ) = domainSourcePointMasters[meshi];
2766 forAll(domainSourceFace, bFacei)
2768 const label oldFacei = bFacei+nIntFaces;
2769 const label allFacei =
faceMap[oldFacei];
2770 const label allbFacei = allFacei-mesh_.nInternalFaces();
2774 sourceProc[allbFacei] = domainSourceProc[bFacei];
2775 sourcePatch[allbFacei] = domainSourcePatch[bFacei];
2776 sourceFace[allbFacei] = domainSourceFace[bFacei];
2777 sourceNewNbrProc[allbFacei] =
2778 domainSourceNewNbr[bFacei];
2786 const label allFacei =
faceMap[oldFacei];
2787 const label allOwn = mesh_.faceOwner()[allFacei];
2789 if (cellMap[faceOwner[oldFacei]] == allOwn)
2813 printMeshInfo(mesh_);
2814 printFieldInfo<volScalarField>(mesh_);
2815 printFieldInfo<volVectorField>(mesh_);
2816 printFieldInfo<volSphericalTensorField>(mesh_);
2817 printFieldInfo<volSymmTensorField>(mesh_);
2818 printFieldInfo<volTensorField>(mesh_);
2819 printFieldInfo<surfaceScalarField>(mesh_);
2820 printFieldInfo<surfaceVectorField>(mesh_);
2821 printFieldInfo<surfaceSphericalTensorField>(mesh_);
2822 printFieldInfo<surfaceSymmTensorField>(mesh_);
2823 printFieldInfo<surfaceTensorField>(mesh_);
2824 printIntFieldInfo<volScalarField::Internal>(mesh_);
2825 printIntFieldInfo<volVectorField::Internal>(mesh_);
2826 printIntFieldInfo<volSphericalTensorField::Internal>(mesh_);
2827 printIntFieldInfo<volSymmTensorField::Internal>(mesh_);
2828 printIntFieldInfo<volTensorField::Internal>(mesh_);
2835 mergeSharedPoints(sourcePointMaster, constructPointMap);
2847 addProcPatches(sourceNewNbrProc, sourcePatch, procPatchID);
2866 repatch(newPatchID, constructFaceMap);
2870 initPatchFields<volScalarField, processorFvPatchField<scalar>>
2874 initPatchFields<volVectorField, processorFvPatchField<vector>>
2886 initPatchFields<volSymmTensorField, processorFvPatchField<symmTensor>>
2890 initPatchFields<volTensorField, processorFvPatchField<tensor>>
2896 mesh_.setInstance(mesh_.time().timeName());
2903 printMeshInfo(mesh_);
2904 printFieldInfo<volScalarField>(mesh_);
2905 printFieldInfo<volVectorField>(mesh_);
2906 printFieldInfo<volSphericalTensorField>(mesh_);
2907 printFieldInfo<volSymmTensorField>(mesh_);
2908 printFieldInfo<volTensorField>(mesh_);
2909 printFieldInfo<surfaceScalarField>(mesh_);
2910 printFieldInfo<surfaceVectorField>(mesh_);
2911 printFieldInfo<surfaceSphericalTensorField>(mesh_);
2912 printFieldInfo<surfaceSymmTensorField>(mesh_);
2913 printFieldInfo<surfaceTensorField>(mesh_);
2914 printIntFieldInfo<volScalarField::Internal>(mesh_);
2915 printIntFieldInfo<volVectorField::Internal>(mesh_);
2916 printIntFieldInfo<volSphericalTensorField::Internal>(mesh_);
2917 printIntFieldInfo<volSymmTensorField::Internal>(mesh_);
2918 printIntFieldInfo<volTensorField::Internal>(mesh_);
2930 std::move(oldPatchStarts),
2931 std::move(oldPatchNMeshPoints),
2933 std::move(subPointMap),
2934 std::move(subFaceMap),
2935 std::move(subCellMap),
2936 std::move(subPatchMap),
2938 std::move(constructPointMap),
2939 std::move(constructFaceMap),
2940 std::move(constructCellMap),
2941 std::move(constructPatchMap),
Various functions to operate on Lists.
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A packed storage of objects of type <T> using an offset table for access.
List< SubListType > unpack() const
Return non-compact list of lists.
static CompactListList< T > pack(const UList< SubListType > &lists, const bool checkOverflow=false)
Construct by packing together the list of lists.
void setSize(const label mRows)
Redimension - same as resize().
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
static const char *const typeName
Typename for Field.
DimensionedField< scalar, volMesh > Internal
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
A HashTable similar to std::unordered_map.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
bool emplace_set(const Key &key, Args &&... args)
Emplace set an entry, overwriting any existing entries.
label size() const noexcept
The number of elements in table.
@ 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,...
const word & name() const noexcept
Return the object name.
label size() const noexcept
The number of elements in the list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
A HashTable to objects of type <T> with a label key.
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name).
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
labelList recvDataCounts() const
Number of unconsumed receive bytes for all processors. Must call finishedSends() or other finished....
void finishedSends(const bool wait=true)
Mark the send phase as being finished.
void clear()
Clear all send/recv buffers and reset states.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
T & emplace_set(const label i, Args &&... args)
Construct and set a new element at given position, (discard old element at that location).
A non-owning sub-view of a List (allocated or unallocated storage).
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static void allToAll(const UList< int32_t > &sendData, UList< int32_t > &recvData, const int communicator=UPstream::worldComm)
Exchange int32_t data with all ranks in communicator.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
@ gatherList
gatherList [manual algorithm]
@ broadcast
broadcast [MPI]
static bool & parRun() noexcept
Test if this a parallel run.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
label size() const noexcept
The number of entries in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A bounding box defined in terms of min/max extrema points.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Accumulating histogram of values. Specified bin resolution automatic generation of bins.
A subset of mesh faces organised as a primitive patch.
A face is a list of labels corresponding to mesh vertices.
static autoPtr< mapAddedPolyMesh > add(fvMesh &mesh0, const fvMesh &mesh1, const faceCoupleInfo &coupleInfo, const bool validBoundary=true, const bool fullyMapped=false)
Inplace add mesh to fvMesh. Maps all stored fields. Returns map.
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
static void printCoupleInfo(const primitiveMesh &, const labelList &, const labelList &, const labelList &, const labelList &)
Print some info on coupling data.
static void printMeshInfo(const polyMesh &)
Print some info on mesh.
static void printIntFieldInfo(const fvMesh &)
Print some field info.
static labelList countCells(const labelList &)
Helper function: count cells per processor in wanted distribution.
static tmp< surfaceScalarField > generateTestField(const fvMesh &)
Generate a test field on faces.
static void printFieldInfo(const fvMesh &)
Print some field info.
autoPtr< mapDistributePolyMesh > distribute(const labelList &dist)
Send cells to neighbours according to distribution.
static void testField(const surfaceScalarField &)
Check whether field consistent with face orientation.
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the su...
const labelList & faceMap() const
Return face map.
const labelList & cellMap() const
Return cell map.
const labelList & faceFlipMap() const
Return face map with sign to encode flipped faces.
const fvMesh & subMesh() const
Return reference to subset mesh.
const labelList & patchMap() const
Return patch map.
const labelList & pointMap() const
Return point map.
Mesh data needed to do the Finite Volume discretisation.
virtual const word & name() const
Return name.
label start() const noexcept
The patch start within the polyMesh face list.
const fvPatch & patch() const noexcept
Return the patch.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Calculates points shared by more than two processor patches or cyclic patches.
Less function class that can be used for sorting processor patches.
bool operator()(const label a, const label b)
lessProcPatches(const labelList &nbrProc, const labelList &referPatchID)
Class containing mesh-to-mesh mapping information after a mesh addition where we add a mesh ('added m...
Class containing processor-to-processor mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
wordList names() const
Return a list of patch names.
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order.
static void mergePoints(const polyMesh &, const Map< label > &pointToMaster, polyTopoChange &meshMod)
Helper: Merge points.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
static word defaultRegion
Return the default region name.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
virtual const pointField & points() const
Return raw points.
Class describing modification of a face.
A patch is a list of labels that address the faces in the global face list.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return pointer to a new patch created on freestore from components.
Direct mesh changes based on v1.3 polyTopoChange syntax.
Cell-face mesh analysis engine.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces).
label nInternalFaces() const noexcept
Number of internal faces.
label nPoints() const noexcept
Number of mesh points.
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
Neighbour processor patch.
This boundary condition enables processor communication across patches.
Neighbour processor patch.
Given list of cells to remove, insert all the topology changes.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define doLocalCode(FieldType, Variable)
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
#define WarningInFunction
Report a warning using Foam::Warning.
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
Namespace for handling debugging switches.
constexpr auto key(const Type &t) noexcept
Helper function to return the enum value.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Pair< label > labelPair
A pair of labels.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
List< word > wordList
List of word.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
ZoneMesh< pointZone, polyMesh > pointZoneMesh
A ZoneMesh with pointZone content on a polyMesh.
List< labelList > labelListList
List of labelList.
dimensionedScalar sign(const dimensionedScalar &ds)
List< label > labelList
A List of labels.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
UIndirectList< label > labelUIndList
UIndirectList of labels.
HashTable< T, labelPair, Foam::Hash< labelPair > > LabelPairMap
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values within a list.
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with faceZone content on a polyMesh.
List< face > faceList
List of faces.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
HashTable< label, labelPair, Foam::Hash< labelPair > > labelPairLookup
This is a Map of a labelPair to a label. Used for e.g. for face1, face2 to shared edge....
Ostream & endl(Ostream &os)
Add newline and flush stream.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with cellZone content on a polyMesh.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
GeometricField< sphericalTensor, fvsPatchField, surfaceMesh > surfaceSphericalTensorField
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
errorManip< error > abort(error &err)
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
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...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
fvsPatchField< vector > fvsPatchVectorField
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField
dimensionedScalar cos(const dimensionedScalar &ds)
fvsPatchField< scalar > fvsPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.