85static const scalar defaultMergeTol = 1
e-7;
95 const label masterMeshProcStart,
96 const label masterMeshProcEnd,
98 const label meshToAddProcStart,
99 const label meshToAddProcEnd,
101 const scalar mergeDist
104 if (fullMatch || masterMesh.
nCells() == 0)
130 label proci=meshToAddProcStart;
131 proci<meshToAddProcEnd;
135 const string toProcString(
"to" +
Foam::name(proci));
136 if (
pp.name().ends_with(toProcString))
138 label meshFacei =
pp.start();
141 masterFaces.append(meshFacei++);
162 bool isConnected =
false;
166 label mergedProci=masterMeshProcStart;
167 !isConnected && (mergedProci < masterMeshProcEnd);
173 label proci = meshToAddProcStart;
174 proci < meshToAddProcEnd;
178 const word fromProcString
183 if (
pp.name() == fromProcString)
193 label meshFacei =
pp.start();
196 addFaces.append(meshFacei++);
220 const scalar mergeDist,
236 Info<<
"mergeSharedPoints : detected " << pointToMaster.size()
237 <<
" points that are to be merged." <<
endl;
252 mesh.updateMesh(map());
258 forAll(pointProcAddressing, proci)
260 labelList& constructMap = pointProcAddressing[proci];
264 label oldPointi = constructMap[i];
267 label
newPointi = map().reversePointMap()[oldPointi];
280 <<
"Problem. oldPointi:" << oldPointi
298 for (
const Time& procDb : databases)
305 if (pointsInstance != procDb.timeName())
308 <<
"Your time was specified as " << procDb.timeName()
309 <<
" but there is no polyMesh/points in that time." <<
nl
310 <<
"(points file at " << pointsInstance <<
')' <<
nl
311 <<
"Please rerun with the correct time specified"
312 <<
" (through the -constant, -time or -latestTime "
313 <<
"(at your option)."
317 Info<<
"Reading points from "
319 <<
" for time = " << procDb.timeName()
343void writeDistribution
366 forAll(cellProcAddressing, proci)
368 const labelList& pCells = cellProcAddressing[proci];
372 cellDecomposition.write();
374 Info<<
nl <<
"Wrote decomposition to "
375 << cellDecomposition.objectRelPath()
376 <<
" for use in manual decomposition." <<
endl;
382 const label oldIndex =
runTime.timeIndex();
385 runTime.setTime(0, oldIndex+1);
404 forAll(cellDecomposition, celli)
406 cellDist[celli] = cellDecomposition[celli];
409 cellDist.correctBoundaryConditions();
412 Info<<
nl <<
"Wrote decomposition to "
413 << cellDist.objectRelPath()
414 <<
" (volScalarField) for visualization."
432 /
mesh.time().timeName()
437 Info<<
nl <<
"Writing merged mesh to "
438 <<
mesh.time().relativePath(outputDir) <<
nl <<
endl;
443 <<
"Failed writing polyMesh."
452 const label masterInternalFaces,
481 Info<<
"Writing addressing : " << outputDir <<
nl;
485 Info<<
" pointProcAddressing" <<
endl;
486 ioAddr.rename(
"pointProcAddressing");
493 labelList faceProcAddr(faceProcAddressing);
495 forAll(faceProcAddr, procFacei)
497 const label masterFacei = faceProcAddr[procFacei];
502 && masterFacei < masterInternalFaces
508 label procOwn = procMesh.
faceOwner()[procFacei];
509 label masterOwn = masterOwner[masterFacei];
511 if (cellProcAddressing[procOwn] == masterOwn)
514 faceProcAddr[procFacei]++;
519 faceProcAddr[procFacei] = -1 - faceProcAddr[procFacei];
525 faceProcAddr[procFacei]++;
529 Info<<
" faceProcAddressing" <<
endl;
530 ioAddr.rename(
"faceProcAddressing");
532 faceProcAddr.clear();
535 Info<<
" cellProcAddressing" <<
endl;
536 ioAddr.rename(
"cellProcAddressing");
541 Info<<
" boundaryProcAddressing" <<
endl;
542 ioAddr.rename(
"boundaryProcAddressing");
552"Merge individual processor meshes back into one master mesh.\n"
553"Use if the original master mesh has been deleted or the processor meshes\n"
554"have been modified (topology change).\n"
555"This tool will write the resulting mesh to a new time step and construct\n"
556"xxxxProcAddressing files in the processor meshes so reconstructPar can be\n"
557"used to regenerate the fields on the master mesh.\n\n"
558"Not well tested & use at your own risk!\n\n";
564void determineFaEdgeMapping
583 const edge meshE(mp, edges[edgei]);
584 pointsToOnePatchEdge.insert(meshE, edgei);
592 forAll(procFaMeshes, proci)
594 const auto& procPatch = procFaMeshes[proci].patch();
595 const auto& edges = procPatch.edges();
596 const auto&
mp = procPatch.meshPoints();
597 const auto& ppAddressing = pointProcAddressing[proci];
599 labelList& edgeProcAddr = faEdgeProcAddressing[proci];
606 edgei < procPatch.nEdges();
610 const edge meshE(mp, edges[edgei]);
611 const edge onePatchE(ppAddressing, meshE);
613 edgeProcAddr[edgei] = pointsToOnePatchEdge[onePatchE];
619void sortFaEdgeMapping
635 remapGlobal.
insert(edgei, remapGlobal.
size());
639 const faMesh& procMesh0 = procFaMeshes[0];
644 forAll(singlePatchEdgeLabels, patchi)
652 forAll(procFaMeshes, proci)
654 const faMesh& procMesh = procFaMeshes[proci];
660 for (label& edgeId : patchEdgeLabels)
662 edgeId = faEdgeProcAddressing[proci][edgeId];
666 singlePatchEdgeLabels[patchi].
append(patchEdgeLabels);
672 for (
const label sortedEdgei : singlePatchEdgeLabels[patchi])
674 remapGlobal.
insert(sortedEdgei, remapGlobal.
size());
683 forAll(procFaMeshes, proci)
685 const faMesh& procMesh = procFaMeshes[proci];
691 for (
const label patchEdgei : fap.
edgeLabels())
693 const label globalEdgei =
694 faEdgeProcAddressing[proci][patchEdgei];
696 const auto fnd = remapGlobal.
cfind(globalEdgei);
699 newEdgeProcAddr[proci][edgei] = fnd.val();
705 <<
"Failed to find edge " << globalEdgei
706 <<
" this indicates a programming error" <<
nl
712 faEdgeProcAddressing = std::move(newEdgeProcAddr);
717int main(
int argc,
char *argv[])
721 "Reconstruct a mesh using geometric/topological information only"
734 "Create procAddressing only without overwriting the mesh"
740 "The merge distance relative to the bounding box size (default 1e-7)"
745 "Do (slower) geometric matching on all boundary faces"
750 "Do matching on processor faces only"
755 "Write cell distribution as a labelList - for use with 'manual' "
756 "decomposition method or as a volScalarField for post-processing."
761 "Suppress finiteArea mesh reconstruction",
783 const bool fullMatch =
args.found(
"fullMatch");
784 const bool procMatch =
args.found(
"procMatch");
785 const bool writeCellDist =
args.found(
"cellDist");
786 bool doFiniteArea = !
args.found(
"no-finite-area");
787 const bool writeAddrOnly =
args.found(
"addressing-only");
789 const scalar mergeTol =
790 args.getOrDefault<scalar>(
"mergeTol", defaultMergeTol);
794 Info<<
"Use geometric matching on all boundary faces." <<
nl <<
endl;
798 Info<<
"Use geometric matching on correct procBoundaries only." <<
nl
799 <<
"This assumes a correct decomposition." <<
endl;
803 Info<<
"Merge assuming correct, fully matched procBoundaries." <<
nl
807 if (fullMatch || procMatch)
809 const scalar writeTol =
812 Info<<
"Merge tolerance : " << mergeTol <<
nl
813 <<
"Write tolerance : " << writeTol <<
endl;
818 && mergeTol < writeTol
822 <<
"Your current settings specify ASCII writing with "
824 <<
"Your merging tolerance (" << mergeTol <<
")"
825 <<
" is finer than this." <<
endl
826 <<
"Please change your writeFormat to binary"
827 <<
" or increase the writePrecision" <<
endl
828 <<
"or adjust the merge tolerance (-mergeTol)."
850 <<
"No regions specified or detected."
870 <<
"No processor* directories found"
877 Info<<
"Found " << nProcs <<
" processor directories" <<
endl;
880 Info<<
" Reading database "
892 args.allowFunctionObjects(),
903 databases[0].times(),
911 runTime.setTime(timeDirs[timei], timei);
916 databases[proci].setTime(timeDirs[timei], timei);
922 label nMeshChanged = 0;
947 hasRegionMesh[regioni] =
true;
966 if (!hasRegionMesh[regioni])
986 label masterInternalFaces;
998 const scalar mergeDist = mergeTol*bb.
mag();
1000 Info<<
"Overall mesh bounding box : " << bb <<
nl
1001 <<
"Relative tolerance : " << mergeTol <<
nl
1002 <<
"Absolute matching distance : " << mergeDist <<
nl
1009 for (label proci=0; proci<nProcs; proci++)
1041 boundProcAddressing[proci] =
1066 renumber(map().addedCellMap(), cellProcAddressing[proci]);
1067 renumber(map().addedFaceMap(), faceProcAddressing[proci]);
1068 renumber(map().addedPointMap(), pointProcAddressing[proci]);
1069 renumber(map().addedPatchMap(), boundProcAddressing[proci]);
1071 for (label step=2; step<nProcs*2; step*=2)
1073 for (label proci=0; proci<nProcs; proci+=step)
1075 label next = proci + step/2;
1081 Info<<
"Merging mesh " << proci <<
" with "
1106 for (label mergedI=proci; mergedI<next; mergedI++)
1111 cellProcAddressing[mergedI]
1117 faceProcAddressing[mergedI]
1122 map().oldPointMap(),
1123 pointProcAddressing[mergedI]
1129 map().oldPatchMap(),
1130 boundProcAddressing[mergedI]
1144 map().addedCellMap(),
1145 cellProcAddressing[addedI]
1150 map().addedFaceMap(),
1151 faceProcAddressing[addedI]
1156 map().addedPointMap(),
1157 pointProcAddressing[addedI]
1162 map().addedPatchMap(),
1163 boundProcAddressing[addedI]
1167 masterMesh.
set(next,
nullptr);
1171 for (label proci=0; proci<nProcs; proci++)
1173 Info<<
"Reading mesh to add from "
1174 << databases[proci].caseName()
1175 <<
" for time = " << databases[proci].timeName()
1181 mergeSharedPoints(mergeDist,masterMesh[0],pointProcAddressing);
1185 masterOwner = masterMesh[0].
faceOwner();
1191 <<
"Disabled writing of merged mesh (-addressing-only)"
1197 writeMesh(masterMesh[0], cellProcAddressing);
1213 for (label proci=0; proci<nProcs; proci++)
1234 meshes.set(proci, &fvMeshes[proci]);
1239 List<DynamicList<label>> localPatch;
1240 List<DynamicList<label>> remoteProc;
1241 List<DynamicList<label>> remotePatch;
1269 const labelList& procFaces = localBoundaryFace[proci];
1270 remoteFaceStart[proci].
setSize(procFaces.
size(), 0);
1282 patchMap[proci] =
identity(
mesh.boundaryMesh().size());
1285 patchMap[proci].setSize(nGlobalPatches);
1287 pointZoneMap[proci] =
identity(
mesh.pointZones().size());
1288 faceZoneMap[proci] =
identity(
mesh.faceZones().size());
1289 cellZoneMap[proci] =
identity(
mesh.cellZones().size());
1297 const labelList oldFaceOwner(fvMeshes[0].faceOwner());
1310 boundProcAddressing,
1323 const auto&
pp =
pbm[patchi];
1326 oldToNew[patchi] = newi++;
1329 const label nNonProcPatches = newi;
1334 if (oldToNew[patchi] == -1)
1336 oldToNew[patchi] = newi++;
1347 masterMeshPtr.
cref(fvMeshes[0]);
1351 const fvMesh& masterMesh = masterMeshPtr();
1371 <<
"Disabled writing of merged mesh (-addressing-only)"
1376 Time& masterTime =
const_cast<Time&
>(masterMesh.
time());
1383 writeMesh(masterMesh, cellProcAddressing);
1393 masterTime.
caseName() = oldCaseName;
1401 Info<<
"Reconstructing addressing from processor meshes"
1402 <<
" to the newly reconstructed mesh" <<
nl <<
endl;
1415 Info<<
"Processor " << proci <<
nl
1416 <<
"Read processor mesh: "
1432 masterInternalFaces,
1435 cellProcAddressing[proci],
1436 faceProcAddressing[proci],
1437 pointProcAddressing[proci],
1438 boundProcAddressing[proci]
1444 const word boundaryInst =
1467 auto& procFaMeshes = procAreaRegionMeshes(areaName);
1468 procFaMeshes.
resize(databases.size());
1473 new faMesh(areaName, procMesh)
1487 if (!procAreaRegionMeshes.
empty())
1489 masterPolyMeshPtr.
reset
1505 for (
const auto& iter : procAreaRegionMeshes.
csorted())
1507 const auto& areaName = iter.key();
1508 const auto& procFaMeshes = iter.val();
1510 const polyMesh& masterMesh = masterPolyMeshPtr();
1522 forAll(procFaMeshes, proci)
1524 const auto& procMesh = procFaMeshes[proci];
1525 const auto& bm = procMesh.boundary();
1527 faBoundProcAddressing[proci] =
identity(bm.size());
1529 faBoundProcAddressing[proci].slice(bm.nNonProcessor()) = -1;
1537 label nPatchFaces = 0;
1538 forAll(procFaMeshes, proci)
1540 const auto& procMesh = procFaMeshes[proci];
1541 const auto& procPolyFaces = procMesh.faceLabels();
1542 const auto& fpa = faceProcAddressing[proci];
1544 labelList& faceAddr = faFaceProcAddressing[proci];
1550 const label facei = procPolyFaces[i];
1551 masterFaceLabels.
append(fpa[facei]);
1552 faceAddr[i] = nPatchFaces++;
1569 std::move(masterFaceLabels),
1573 const auto& masterPatch = masterFaMesh.patch();
1579 const auto& mpm = masterPatch.meshPointMap();
1580 forAll(procFaMeshes, proci)
1582 const auto& procPatch = procFaMeshes[proci].patch();
1583 const auto&
mp = procPatch.meshPoints();
1585 auto& pointAddr = faPointProcAddressing[proci];
1586 pointAddr.resize_nocopy(
mp.size());
1590 pointAddr[i] = mpm[pointProcAddressing[proci][
mp[i]]];
1599 determineFaEdgeMapping
1603 pointProcAddressing,
1605 faEdgeProcAddressing
1617 pointProcAddressing,
1619 faEdgeProcAddressing,
1620 singlePatchEdgeLabels
1624 const faMesh& procMesh0 = procFaMeshes[0];
1632 forAll(completePatches, patchi)
1634 const auto& patchEdgeLabels = singlePatchEdgeLabels[patchi];
1651 masterFaMesh.boundary(),
1667 masterFaMesh.addFaPatches(completePatches);
1679 masterFaMesh.faceLabels()
1682 forAll(procFaMeshes, proci)
1684 const faMesh& procMesh = procFaMeshes[proci];
1698 faBoundProcAddressing[proci],
1699 faFaceProcAddressing[proci],
1700 faPointProcAddressing[proci],
1701 faEdgeProcAddressing[proci]
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric.
A HashTable similar to std::unordered_map.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
bool empty() const noexcept
True if the hash table is empty.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
void reserve(label numEntries)
Reserve space for at least the specified number of elements (not the number of buckets) and regenerat...
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
label size() const noexcept
The number of elements in table.
UPtrList< const node_type > csorted() const
Const access to the hash-table contents in sorted order (sorted by keys).
bool emplace(const Key &key, Args &&... args)
Emplace insert a new entry, not overwriting existing entries.
static void writeContents(const IOobject &io, const UList< label > &content)
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
@ ASCII
"ascii" (normal default)
static unsigned int defaultPrecision() noexcept
Return the default precision.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void append(const T &val)
Append an element at the end of the list.
void setSize(label n)
Alias for resize().
A HashTable to objects of type <T> with a label key.
label nEdges() const
Number of edges in patch.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
label nInternalEdges() const
Number of internal edges.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
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,...
void resize(const label newLen)
Adjust size of PtrList.
bool processorCase() const noexcept
True if this is a processor case.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
word findInstance(const fileName &directory, const word &name=word::null, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, const word &stopInstance=word::null, const bool constant_fallback=true) const
Return time instance (location) of directory containing the file name (eg, used in reading mesh data)...
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.
static word controlDictName
The default control dictionary name (normally "controlDict").
const fileName & caseName() const noexcept
The case name.
void size(const label n)
Older name for setAddressableSize.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
label size() const noexcept
The number of entries in the list.
static void addVerboseOption(const string &usage="", bool advanced=false)
Enable a 'verbose' bool option, with usage information.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
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 bounding box defined in terms of min/max extrema points.
void add(const boundBox &bb)
Extend to include the second box.
scalar mag() const
The magnitude/length of the bounding box diagonal.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
Finite area boundary mesh, which is a faPatch list with registered IO, a reference to the associated ...
label nNonProcessor() const
The number of patches before the first processor patch.
static void writeMesh(const word &timeName, const faMesh &fullMesh, const labelUList &singlePatchFaceLabels)
Write mesh information.
static void writeAddressing(const IOobject &io, const labelUList &faBoundaryProcAddr, const labelUList &faFaceProcAddr, const labelUList &faPointProcAddr, const labelUList &faEdgeProcAddr)
Write proc addressing.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir).
label nInternalEdges() const noexcept
Number of internal faces.
static word meshSubDir
The mesh sub-directory name (usually "faMesh").
Finite area patch class. Used for 2-D non-Euclidian finite area method.
virtual autoPtr< faPatch > clone(const faBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
const labelList & edgeLabels() const noexcept
Return the list of edges.
label ngbPolyPatchIndex() const noexcept
The neighbour polyPatch index.
A class for handling file names.
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.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
const Time & time() const noexcept
Return time registry.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
static void mergePoints(const polyMesh &, const Map< label > &pointToMaster, polyTopoChange &meshMod)
Helper: Merge points.
static void patchFacePairs(const UPtrList< polyMesh > &meshes, const List< DynamicList< label > > &localPatch, const List< DynamicList< label > > &remoteMesh, const List< DynamicList< label > > &remotePatch, labelListList &localBoundaryFace, labelListList &remoteFaceMesh, labelListList &remoteBoundaryFace)
Helper: expand list of coupled patches into pairs of coupled faces.
static Map< label > findSharedPoints(const polyMesh &, const scalar mergeTol)
Find topologically and geometrically shared points.
static label procPatchPairs(const UPtrList< polyMesh > &meshes, List< DynamicList< label > > &localPatch, List< DynamicList< label > > &remoteMesh, List< DynamicList< label > > &remotePatch)
Helper: find pairs of processor patches. Return number of non-processor patches.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
static const word & regionName(const word ®ion)
The mesh region name or word::null if polyMesh::defaultRegion.
const fileName & facesInstance() const
Return the current instance directory for faces.
static word defaultRegion
Return the default region name.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir).
virtual const labelList & faceOwner() const
Return face owner.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh").
A patch is a list of labels that address the faces in the global face list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
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.
static word newName(const label myProcNo, const label neighbProcNo)
Return the name of a processorPolyPatch ("procBoundary..") constructed from the pair of processor IDs...
A class for managing references or pointers (no reference counting).
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
void reset(T *p=nullptr) noexcept
Delete managed pointer and set to new given pointer.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
instantList select(const instantList ×) const
Select a list of Time values that are within the ranges.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));if(U.nOldTimes()){ volVectorField *Uold=&U.oldTime();volScalarField *Kold=&K.oldTime(); *Kold==0.5 *magSqr(*Uold);while(Uold->nOldTimes()) { Uold=&Uold-> oldTime()
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar mp
Proton mass.
bool allowFaModels() noexcept
The enable/disable state for regionFaModel (default: true).
List< edge > edgeList
List of edge.
const dimensionSet dimless
Dimensionless.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
UIndirectList< label > labelUIndList
UIndirectList of labels.
IOList< label > labelIOList
IO for a List of label.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler().
CompactIOList< face > faceCompactIOList
Compact IO for a List of face.
messageStream Info
Information stream (stdout output on master, null elsewhere).
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values within a list.
vectorIOField pointIOField
pointIOField is a vectorIOField.
List< instant > instantList
List of instants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeMaps(Ostream &os, const word &key, const labelListList &maps)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
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...
void sort(UList< T > &list)
Sort the list.
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
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.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< faPatch > faPatchList
Store lists of faPatch as a PtrList.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.