85 static 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)
129 forAll(masterPatches, patchi)
133 if (isA<processorPolyPatch>(
pp))
137 label proci=meshToAddProcStart;
138 proci<meshToAddProcEnd;
142 const string toProcString(
"to" +
name(proci));
144 pp.name().rfind(toProcString)
145 == (
pp.name().size()-toProcString.size())
148 label meshFacei =
pp.start();
151 masterFaces.append(meshFacei++);
159 masterFaces.shrink();
173 forAll(addPatches, patchi)
177 if (isA<processorPolyPatch>(
pp))
179 bool isConnected =
false;
183 label mergedProci=masterMeshProcStart;
184 !isConnected && (mergedProci < masterMeshProcEnd);
190 label proci = meshToAddProcStart;
191 proci < meshToAddProcEnd;
195 const word fromProcString
200 if (
pp.name() == fromProcString)
210 label meshFacei =
pp.start();
213 addFaces.append(meshFacei++);
238 const scalar mergeDist,
254 Info<<
"mergeSharedPoints : detected " << pointToMaster.size()
255 <<
" points that are to be merged." <<
endl;
276 forAll(pointProcAddressing, proci)
278 labelList& constructMap = pointProcAddressing[proci];
282 label oldPointi = constructMap[i];
285 label
newPointi = map().reversePointMap()[oldPointi];
298 <<
"Problem. oldPointi:" << oldPointi
316 for (
const Time& procDb : databases)
323 if (pointsInstance != procDb.timeName())
326 <<
"Your time was specified as " << procDb.timeName()
327 <<
" but there is no polyMesh/points in that time." <<
nl 328 <<
"(points file at " << pointsInstance <<
')' <<
nl 329 <<
"Please rerun with the correct time specified" 330 <<
" (through the -constant, -time or -latestTime " 331 <<
"(at your option)." 335 Info<<
"Reading points from " 337 <<
" for time = " << procDb.timeName()
361 void writeDistribution
384 forAll(cellProcAddressing, proci)
386 const labelList& pCells = cellProcAddressing[proci];
390 cellDecomposition.write();
392 Info<<
nl <<
"Wrote decomposition to " 393 << cellDecomposition.objectRelPath()
394 <<
" for use in manual decomposition." <<
endl;
422 forAll(cellDecomposition, celli)
424 cellDist[celli] = cellDecomposition[celli];
427 cellDist.correctBoundaryConditions();
430 Info<<
nl <<
"Wrote decomposition to " 431 << cellDist.objectRelPath()
432 <<
" (volScalarField) for visualization." 455 Info<<
nl <<
"Writing merged mesh to " 461 <<
"Failed writing polyMesh." 470 const label masterInternalFaces,
499 Info<<
"Writing addressing : " << outputDir <<
nl;
503 Info<<
" pointProcAddressing" <<
endl;
504 ioAddr.rename(
"pointProcAddressing");
508 Info<<
" faceProcAddressing" <<
endl;
509 ioAddr.rename(
"faceProcAddressing");
510 labelIOList faceProcAddr(ioAddr, faceProcAddressing);
514 forAll(faceProcAddr, procFacei)
516 const label masterFacei = faceProcAddr[procFacei];
520 !procMesh.isInternalFace(procFacei)
521 && masterFacei < masterInternalFaces
527 label procOwn = procMesh.faceOwner()[procFacei];
528 label masterOwn = masterOwner[masterFacei];
530 if (cellProcAddressing[procOwn] == masterOwn)
533 faceProcAddr[procFacei]++;
538 faceProcAddr[procFacei] = -1 - faceProcAddr[procFacei];
544 faceProcAddr[procFacei]++;
548 faceProcAddr.write();
552 Info<<
" cellProcAddressing" <<
endl;
553 ioAddr.rename(
"cellProcAddressing");
558 Info<<
" boundaryProcAddressing" <<
endl;
559 ioAddr.rename(
"boundaryProcAddressing");
569 "Merge individual processor meshes back into one master mesh.\n" 570 "Use if the original master mesh has been deleted or the processor meshes\n" 571 "have been modified (topology change).\n" 572 "This tool will write the resulting mesh to a new time step and construct\n" 573 "xxxxProcAddressing files in the processor meshes so reconstructPar can be\n" 574 "used to regenerate the fields on the master mesh.\n\n" 575 "Not well tested & use at your own risk!\n\n";
581 void determineFaEdgeMapping
600 const edge meshE(
mp, edges[edgei]);
601 pointsToOnePatchEdge.insert(meshE, edgei);
609 forAll(procFaMeshes, proci)
611 const auto& procPatch = procFaMeshes[proci].patch();
612 const auto& edges = procPatch.edges();
613 const auto&
mp = procPatch.meshPoints();
614 const auto& ppAddressing = pointProcAddressing[proci];
616 labelList& edgeProcAddr = faEdgeProcAddressing[proci];
623 edgei < procPatch.nEdges();
627 const edge meshE(
mp, edges[edgei]);
628 const edge onePatchE(ppAddressing, meshE);
630 edgeProcAddr[edgei] = pointsToOnePatchEdge[onePatchE];
636 void sortFaEdgeMapping
651 remapGlobal.
insert(edgei, remapGlobal.size());
655 const faMesh& procMesh0 = procFaMeshes[0];
660 forAll(singlePatchEdgeLabels, patchi)
662 if (isA<ignoreFaPatch>(procMesh0.
boundary()[patchi]))
668 forAll(procFaMeshes, proci)
670 const faMesh& procMesh = procFaMeshes[proci];
676 for (label& edgeId : patchEdgeLabels)
678 edgeId = faEdgeProcAddressing[proci][edgeId];
682 singlePatchEdgeLabels[patchi].
append(patchEdgeLabels);
688 for (
const label sortedEdgei : singlePatchEdgeLabels[patchi])
690 remapGlobal.insert(sortedEdgei, remapGlobal.size());
699 forAll(procFaMeshes, proci)
701 const faMesh& procMesh = procFaMeshes[proci];
707 for (
const label patchEdgei : fap.
edgeLabels())
709 const label globalEdgei =
710 faEdgeProcAddressing[proci][patchEdgei];
712 const auto fnd = remapGlobal.cfind(globalEdgei);
715 newEdgeProcAddr[proci][edgei] = fnd.val();
721 <<
"Failed to find edge " << globalEdgei
722 <<
" this indicates a programming error" <<
nl 728 faEdgeProcAddressing = std::move(newEdgeProcAddr);
733 int main(
int argc,
char *argv[])
737 "Reconstruct a mesh using geometric/topological information only" 750 "Create procAddressing only without overwriting the mesh" 756 "The merge distance relative to the bounding box size (default 1e-7)" 761 "Do (slower) geometric matching on all boundary faces" 766 "Do matching on processor faces only" 771 "Write cell distribution as a labelList - for use with 'manual' " 772 "decomposition method or as a volScalarField for post-processing." 777 "Suppress finiteArea mesh reconstruction",
788 const bool fullMatch =
args.
found(
"fullMatch");
789 const bool procMatch =
args.
found(
"procMatch");
790 const bool writeCellDist =
args.
found(
"cellDist");
791 bool doFiniteArea = !
args.
found(
"no-finite-area");
792 const bool writeAddrOnly =
args.
found(
"addressing-only");
794 const scalar mergeTol =
799 Info<<
"Use geometric matching on all boundary faces." <<
nl <<
endl;
803 Info<<
"Use geometric matching on correct procBoundaries only." <<
nl 804 <<
"This assumes a correct decomposition." <<
endl;
808 Info<<
"Merge assuming correct, fully matched procBoundaries." <<
nl 812 if (fullMatch || procMatch)
814 const scalar writeTol =
817 Info<<
"Merge tolerance : " << mergeTol <<
nl 818 <<
"Write tolerance : " << writeTol <<
endl;
823 && mergeTol < writeTol
827 <<
"Your current settings specify ASCII writing with " 829 <<
"Your merging tolerance (" << mergeTol <<
")" 830 <<
" is finer than this." <<
endl 831 <<
"Please change your writeFormat to binary" 832 <<
" or increase the writePrecision" <<
endl 833 <<
"or adjust the merge tolerance (-mergeTol)." 847 <<
"No regions specified or detected." 867 <<
"No processor* directories found" 874 Info<<
"Found " << nProcs <<
" processor directories" <<
endl;
877 Info<<
" Reading database " 900 databases[0].times(),
913 databases[proci].setTime(timeDirs[timei], timei);
919 label nMeshChanged = 0;
943 hasRegionMesh[regioni] =
true;
962 if (!hasRegionMesh[regioni])
982 label masterInternalFaces;
994 const scalar mergeDist = mergeTol*bb.
mag();
996 Info<<
"Overall mesh bounding box : " << bb <<
nl 997 <<
"Relative tolerance : " << mergeTol <<
nl 998 <<
"Absolute matching distance : " << mergeDist <<
nl 1005 for (label proci=0; proci<nProcs; proci++)
1037 boundProcAddressing[proci] =
1062 renumber(map().addedCellMap(), cellProcAddressing[proci]);
1063 renumber(map().addedFaceMap(), faceProcAddressing[proci]);
1064 renumber(map().addedPointMap(), pointProcAddressing[proci]);
1065 renumber(map().addedPatchMap(), boundProcAddressing[proci]);
1067 for (label step=2; step<nProcs*2; step*=2)
1069 for (label proci=0; proci<nProcs; proci+=step)
1071 label next = proci + step/2;
1077 Info<<
"Merging mesh " << proci <<
" with " 1102 for (label mergedI=proci; mergedI<next; mergedI++)
1107 cellProcAddressing[mergedI]
1113 faceProcAddressing[mergedI]
1118 map().oldPointMap(),
1119 pointProcAddressing[mergedI]
1125 map().oldPatchMap(),
1126 boundProcAddressing[mergedI]
1140 map().addedCellMap(),
1141 cellProcAddressing[addedI]
1146 map().addedFaceMap(),
1147 faceProcAddressing[addedI]
1152 map().addedPointMap(),
1153 pointProcAddressing[addedI]
1158 map().addedPatchMap(),
1159 boundProcAddressing[addedI]
1163 masterMesh.
set(next,
nullptr);
1167 for (label proci=0; proci<nProcs; proci++)
1169 Info<<
"Reading mesh to add from " 1170 << databases[proci].caseName()
1171 <<
" for time = " << databases[proci].timeName()
1177 mergeSharedPoints(mergeDist,masterMesh[0],pointProcAddressing);
1181 masterOwner = masterMesh[0].
faceOwner();
1187 <<
"Disabled writing of merged mesh (-addressing-only)" 1193 writeMesh(masterMesh[0], cellProcAddressing);
1209 for (label proci=0; proci<nProcs; proci++)
1265 const labelList& procFaces = localBoundaryFace[proci];
1266 remoteFaceStart[proci].
setSize(procFaces.
size(), 0);
1281 patchMap[proci].
setSize(nGlobalPatches);
1293 const labelList oldFaceOwner(fvMeshes[0].faceOwner());
1306 boundProcAddressing,
1319 const auto&
pp =
pbm[patchi];
1320 if (!isA<processorPolyPatch>(
pp) ||
pp.size())
1322 oldToNew[patchi] = newi++;
1325 const label nNonProcPatches = newi;
1330 if (oldToNew[patchi] == -1)
1332 oldToNew[patchi] = newi++;
1343 masterMeshPtr.
cref(fvMeshes[0]);
1347 const fvMesh& masterMesh = masterMeshPtr();
1367 <<
"Disabled writing of merged mesh (-addressing-only)" 1372 Time& masterTime =
const_cast<Time&
>(masterMesh.
time());
1379 writeMesh(masterMesh, cellProcAddressing);
1389 masterTime.
caseName() = oldCaseName;
1397 Info<<
"Reconstructing addressing from processor meshes" 1398 <<
" to the newly reconstructed mesh" <<
nl <<
endl;
1407 Info<<
"Processor " << proci <<
nl 1408 <<
"Read processor mesh: " 1424 const polyMesh& procMesh = procMeshes[proci];
1428 masterInternalFaces,
1431 cellProcAddressing[proci],
1432 faceProcAddressing[proci],
1433 pointProcAddressing[proci],
1434 boundProcAddressing[proci]
1440 const word boundaryInst =
1461 procFaMeshes.
set(proci,
new faMesh(procMesh));
1468 doFiniteArea =
false;
1469 forAll(procFaMeshes, proci)
1471 if (procFaMeshes.
set(proci))
1473 doFiniteArea =
true;
1489 forAll(procFaMeshes, proci)
1491 const auto& procMesh = procFaMeshes[proci];
1492 const auto& bm = procMesh.boundary();
1494 faBoundProcAddressing[proci] =
identity(bm.size());
1498 label patchi = bm.nNonProcessor();
1503 faBoundProcAddressing[proci][patchi] = -1;
1526 label nPatchFaces = 0;
1527 forAll(procFaMeshes, proci)
1529 const auto& procMesh = procFaMeshes[proci];
1530 const auto& procPolyFaces = procMesh.faceLabels();
1531 const auto& fpa = faceProcAddressing[proci];
1533 labelList& faceAddr = faFaceProcAddressing[proci];
1539 const label facei = procPolyFaces[i];
1540 masterFaceLabels.
append(fpa[facei]);
1541 faceAddr[i] = nPatchFaces++;
1557 std::move(masterFaceLabels),
1562 masterFaMesh.patch();
1569 forAll(procFaMeshes, proci)
1571 const auto& procPatch = procFaMeshes[proci].patch();
1572 const auto&
mp = procPatch.meshPoints();
1574 labelList& pointAddr = faPointProcAddressing[proci];
1579 pointAddr[i] = mpm[pointProcAddressing[proci][
mp[i]]];
1588 determineFaEdgeMapping
1592 pointProcAddressing,
1594 faEdgeProcAddressing
1606 pointProcAddressing,
1608 faEdgeProcAddressing,
1609 singlePatchEdgeLabels
1613 const faMesh& procMesh0 = procFaMeshes[0];
1621 forAll(completePatches, patchi)
1624 singlePatchEdgeLabels[patchi];
1628 if (isA<ignoreFaPatch>(fap))
1641 masterFaMesh.boundary(),
1657 masterFaMesh.addFaPatches(completePatches);
1669 masterFaMesh.faceLabels()
1672 forAll(procFaMeshes, proci)
1674 const faMesh& procMesh = procFaMeshes[proci];
1688 faBoundProcAddressing[proci],
1689 faFaceProcAddressing[proci],
1690 faPointProcAddressing[proci],
1691 faEdgeProcAddressing[proci]
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
const polyBoundaryMesh & pbm
const Type & value() const noexcept
Return const reference to value.
static void addNote(const string ¬e)
Add extra notes for the usage information.
void size(const label n)
Older name for setAddressableSize.
void writeMesh() const
Write equivalent mesh information at the polyMesh faceInstances time.
fileName path() const
Return path = rootPath/caseName. Same as TimePaths::path()
Info<< "Creating field kinetic energy K\"<< 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()
A class for handling file names.
readOption readOpt() const noexcept
Get the read option.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fileName & facesInstance() const
Return the current instance directory for faces.
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
const word & regionName() const
The mesh region name or word::null if polyMesh::defaultRegion.
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values within a list.
const fileName & caseName() const noexcept
Return case name.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
UIndirectList< label > labelUIndList
UIndirectList of labels.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
static word newName(const label myProcNo, const label neighbProcNo)
Return the name of a processorPolyPatch ("procBoundary..") constructed from the pair of processor IDs...
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
virtual autoPtr< faPatch > clone(const faBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
fileName relativePath(const fileName &input, const bool caseTag=false) const
Return the input relative to the globalPath by stripping off a leading value of the globalPath...
label nInternalEdges() const
Number of internal edges.
static unsigned int defaultPrecision() noexcept
Return the default precision.
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.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler()
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
A bounding box defined in terms of min/max extrema points.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
static void writeContents(const IOobject &io, const UList< T > &content)
Write contents. The IOobject is never registered.
const Time & time() const
Return the top-level database.
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
label nFaces() const noexcept
Number of mesh faces.
const labelList & edgeLabels() const noexcept
Return the list of edges.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for managing references or pointers (no reference counting)
instantList select(const instantList ×) const
Select a list of Time values that are within the ranges.
bool processorCase() const noexcept
True if this is a processor case.
bool allowFunctionObjects() const
The controlDict 'functions' entry is allowed to be used.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
#define forAll(list, i)
Loop across all elements in list.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
A list of faces which address into the list of points.
bool allowLibs() const
The controlDict 'libs' entry is allowed to be used. (eg, has not been disabled by the -no-libs option...
void add(const boundBox &bb)
Extend to include the second box.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
const Map< label > & meshPointMap() const
Mesh point map.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh corresponding to the given map.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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)...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
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...
static void mergePoints(const polyMesh &, const Map< label > &pointToMaster, polyTopoChange &meshMod)
Helper: Merge points.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
const Time & time() const noexcept
Return time registry.
void sort(UList< T > &list)
Sort the list.
static word defaultRegion
Return the default region name.
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
scalar mag() const
The magnitude/length of the bounding box diagonal.
label size() const noexcept
The number of entries in the list.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
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.
virtual const labelList & faceOwner() const
Return face owner.
Reading is optional [identical to LAZY_READ].
static const word null
An empty word.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
label nInternalFaces() const noexcept
Number of internal faces.
label timeIndex() const noexcept
Return the current time index.
void append(const T &val)
Copy append an element to the end of this list.
static word controlDictName
The default control dictionary name (normally "controlDict")
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
errorManip< error > abort(error &err)
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
const fileName & caseName() const noexcept
Return case name (parallel run) or global case (serial run)
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.
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (respects is_globalIOobject trait) and check its info.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh...
static void addVerboseOption(const string &usage="", bool advanced=false)
Enable a 'verbose' bool option, with usage information.
label nEdges() const
Number of edges in patch.
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.
const word & constant() const noexcept
Return constant name.
const fileName & rootPath() const noexcept
Return root path.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
fileName path() const
Return the full path to the (processor local) case.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void writeAddressing() const
Write proc addressing at the polyMesh faceInstances time.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
static word meshSubDir
The mesh sub-directory name (usually "faMesh")
label nInternalEdges() const noexcept
Number of internal faces.
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.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label nCells() const noexcept
Number of mesh cells.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
label nNonProcessor() const
The number of patches before the first processor patch.
Mesh data needed to do the Finite Volume discretisation.
Direct mesh changes based on v1.3 polyTopoChange syntax.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
Finite area boundary mesh, which is a faPatch list with registered IO, a reference to the associated ...
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
IOstreamOption::streamFormat writeFormat() const noexcept
Get write stream format.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
A primitive field of type <T> with automated input and output.
static void writeMaps(Ostream &os, const word &key, const labelListList &maps)
static const word & regionName(const word ®ion)
The mesh region name or word::null if polyMesh::defaultRegion.
Do not request registration (bool: false)
const dimensionedScalar mp
Proton mass.
static Map< label > findSharedPoints(const polyMesh &, const scalar mergeTol)
Find topologically and geometrically shared points.
bool found(const word &optName) const
Return true if the named option is found.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
label ngbPolyPatchIndex() const noexcept
The neighbour polyPatch index.
static constexpr const zero Zero
Global zero (0)