Go to the documentation of this file.
109 using namespace Foam;
127 masterTimeDirs = localTimeDirs;
135 for (
const instant& t : masterTimeDirs)
137 if (!localTimeDirs.found(t))
157 const bool decompose,
159 const word& readTimeName,
165 const IOobject readIO(
"uniform", readTimeName, readDb);
176 if (!readPath.empty())
178 Info<<
"Detected additional non-decomposed files in "
207 Pout<<
" readPath :" << readPath <<
endl;
208 Pout<<
" writePath :" << writePath <<
endl;
209 Pout<<
" currentPath:" << currentPath <<
endl;
212 if (readPath == writePath)
217 if (currentPath.empty())
222 fh.
cp(readPath, writePath);
230 fh.
cp(readPath, writePath);
239 if (isA<fileOperations::collatedFileOperation>(fh))
245 fh.
cp(readPath, writePath);
252 fh.
cp(readPath, writePath);
262 const fileName facesPath(meshPath/
"faces");
263 Info<<
"Checking for mesh in " << facesPath <<
nl <<
endl;
271 Info<<
"Per processor mesh availability:" <<
nl
294 basicFvGeometryScheme::typeName
328 label maxProcCells = 0;
329 label totProcFaces = 0;
330 label maxProcPatches = 0;
331 label totProcPatches = 0;
332 label maxProcFaces = 0;
337 <<
"Processor " << procI <<
nl
338 <<
" Number of cells = " << globalCells.localSize(procI)
341 label nProcFaces = 0;
343 const labelList& nei = patchNeiProcNo[procI];
345 forAll(patchNeiProcNo[procI], i)
347 Info<<
" Number of faces shared with processor "
348 << patchNeiProcNo[procI][i] <<
" = " << patchSize[procI][i]
351 nProcFaces += patchSize[procI][i];
354 Info<<
" Number of processor patches = " << nei.size() <<
nl
355 <<
" Number of processor faces = " << nProcFaces <<
nl
356 <<
" Number of boundary faces = "
357 << globalBoundaryFaces.localSize(procI)-nProcFaces <<
endl;
359 maxProcCells =
max(maxProcCells, globalCells.localSize(procI));
360 totProcFaces += nProcFaces;
361 totProcPatches += nei.size();
362 maxProcPatches =
max(maxProcPatches, nei.size());
363 maxProcFaces =
max(maxProcFaces, nProcFaces);
373 if (totProcPatches == 0)
377 if (totProcFaces == 0)
383 <<
"Number of processor faces = " << totProcFaces/2 <<
nl
384 <<
"Max number of cells = " << maxProcCells
385 <<
" (" << 100.0*(maxProcCells-avgProcCells)/avgProcCells
386 <<
"% above average " << avgProcCells <<
")" <<
nl
387 <<
"Max number of processor patches = " << maxProcPatches
388 <<
" (" << 100.0*(maxProcPatches-avgProcPatches)/avgProcPatches
389 <<
"% above average " << avgProcPatches <<
")" <<
nl
390 <<
"Max number of faces between processors = " << maxProcFaces
391 <<
" (" << 100.0*(maxProcFaces-avgProcFaces)/avgProcFaces
392 <<
"% above average " << avgProcFaces <<
")" <<
nl
398 void writeDecomposition
420 cellDecomposition.write();
422 Info<<
"Writing wanted cell distribution to volScalarField " <<
name
423 <<
" for postprocessing purposes." <<
nl <<
endl;
438 zeroGradientFvPatchScalarField::typeName
443 procCells[cI] = decomp[cI];
446 procCells.correctBoundaryConditions();
451 void determineDecomposition
453 const Time& baseRunTime,
455 const bool decompose,
458 const bool writeCellDist,
476 <<
"You have selected decomposition method "
477 << decomposer.typeName
478 <<
" which does" <<
nl
479 <<
"not synchronise the decomposition across"
480 <<
" processor patches." <<
nl
481 <<
" You might want to select a decomposition method"
482 <<
" which is aware of this. Continuing."
492 <<
" to read decomposeParDict" <<
endl;
498 if (method.
found(
"weightField"))
514 cellWeights = weights.internalField();
522 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
538 <<
" to write undecomposed cellDist" <<
endl;
542 writeDecomposition(
"cellDist",
mesh, decomp);
543 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
552 writeDecomposition(
"cellDist",
mesh, decomp);
559 void writeProcAddressing
574 "cellProcAddressing",
587 "faceProcAddressing",
600 "pointProcAddressing",
613 "boundaryProcAddressing",
719 if (writeHandler.
valid())
721 defaultHandler =
fileHandler(std::move(writeHandler));
724 const bool cellOk = cellMap.write();
725 const bool faceOk =
faceMap.write();
726 const bool pointOk = pointMap.write();
727 const bool patchOk = patchMap.write();
729 if (defaultHandler.
valid())
731 writeHandler =
fileHandler(std::move(defaultHandler));
734 if (!cellOk || !faceOk || !pointOk || !patchOk)
737 <<
"Failed to write " << cellMap.objectPath()
738 <<
", " <<
faceMap.objectPath()
739 <<
", " << pointMap.objectPath()
740 <<
", " << patchMap.objectPath()
749 for (
const auto prefix : {
"boundary",
"cell",
"face",
"point"})
753 prefix +
word(
"ProcAddressing"),
766 template<
class GeoField>
780 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
798 template<
class GeoField>
812 wordList objectNames = objects.sortedNames();
821 <<
"Objects not synchronised across processors." <<
nl
828 fields.setSize(masterNames.size());
854 if (!haveMesh[procI])
919 template<
class GeoField,
class CoupledPatchType>
920 void correctCoupledBoundaryConditions(
fvMesh&
mesh)
924 mesh.objectRegistry::lookupClass<GeoField>()
929 GeoField&
fld = *iter();
931 typename GeoField::Boundary& bfld =
fld.boundaryFieldRef();
942 auto& pfld = bfld[patchi];
945 if (fvp.coupled() && !isA<cyclicACMIFvPatch>(fvp))
961 for (
auto& pfld : bfld)
963 const auto& fvp = pfld.patch();
965 if (fvp.coupled() && !isA<cyclicACMIFvPatch>(fvp))
974 fld.mesh().globalData().patchSchedule();
976 forAll(patchSchedule, patchEvali)
978 const label patchi = patchSchedule[patchEvali].patch;
980 auto& pfld = bfld[patchi];
982 if (fvp.coupled() && !isA<cyclicACMIFvPatch>(fvp))
984 if (patchSchedule[patchEvali].
init)
998 <<
"Unsupported communications type "
1010 const Time& baseRunTime,
1013 const bool doReadFields,
1014 const bool decompose,
1016 const bool overwrite,
1018 const label nDestProcs,
1062 const bool allHaveMesh = !haveMesh.found(
false);
1073 <<
"Cannot find non-processor patch on processor "
1102 <<
" mesh:" <<
mesh.objectRegistry::objectPath()
1103 <<
" have objects:" << objects.
names() <<
endl;
1107 auto iter = objects.find(
"cellDist");
1110 objects.erase(iter);
1145 volSphereTensorFields
1193 surfSphereTensorFields
1202 surfSymmTensorFields
1240 dimSphereTensorFields
1268 objects.lookupClass(pointScalarField::typeName).sortedNames()
1272 objects.lookupClass(pointVectorField::typeName).sortedNames()
1278 pointSphericalTensorField::typeName
1285 pointSymmTensorField::typeName
1290 objects.lookupClass(pointTensorField::typeName).sortedNames()
1312 Info<<
"After distribution:" <<
endl;
1313 printMeshData(
mesh);
1316 correctCoupledBoundaryConditions
1321 correctCoupledBoundaryConditions
1326 correctCoupledBoundaryConditions
1331 correctCoupledBoundaryConditions
1336 correctCoupledBoundaryConditions
1378 Info<<
"Setting caseName to " << baseRunTime.
caseName()
1379 <<
" to write reconstructed mesh and fields." <<
endl;
1386 for (
const word& fieldName : pointFieldNames)
1402 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
1410 if (writeHandler.
valid())
1412 defaultHandler =
fileHandler(std::move(writeHandler));
1417 if (defaultHandler.
valid())
1419 writeHandler =
fileHandler(std::move(defaultHandler));
1422 for (
const word& fieldName : pointFieldNames)
1444 writeProcAddressing(std::move(writeHandler),
mesh, map, decompose);
1451 removeProcAddressing(
mesh);
1487 refData.distribute(map);
1499 Info<<
"Setting caseName to " << baseRunTime.
caseName()
1500 <<
" to write reconstructed refinement data." <<
endl;
1507 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
1611 forAll(boundaryProcAddressing, i)
1613 if (boundaryProcAddressing[i] != -1)
1615 patchProcAddressing.append(boundaryProcAddressing[i]);
1625 if (baseMeshPtr && baseMeshPtr->nCells())
1627 const fvMesh& baseMesh = *baseMeshPtr;
1635 std::move(cellSubMap),
1636 std::move(cellAddressing)
1645 std::move(faceSubMap),
1646 std::move(faceAddressing),
1657 std::move(pointSubMap),
1658 std::move(pointAddressing)
1669 std::move(patchSubMap),
1670 std::move(boundaryAddressing)
1679 labelList oldPatchNMeshPoints(pbm.size());
1682 oldPatchStarts[patchI] = pbm[patchI].
start();
1683 oldPatchNMeshPoints[patchI] = pbm[patchI].nPoints();
1693 std::move(oldPatchStarts),
1694 std::move(oldPatchNMeshPoints),
1695 std::move(pointMap),
1711 std::move(cellSubMap),
1712 std::move(cellConstructMap)
1722 std::move(faceSubMap),
1723 std::move(faceConstructMap),
1735 std::move(pointSubMap),
1736 std::move(pointConstructMap)
1748 std::move(patchSubMap),
1749 std::move(patchConstructMap)
1758 labelList oldPatchNMeshPoints(pbm.size());
1761 oldPatchStarts[patchI] = pbm[patchI].
start();
1762 oldPatchNMeshPoints[patchI] = pbm[patchI].nPoints();
1772 std::move(oldPatchStarts),
1773 std::move(oldPatchNMeshPoints),
1774 std::move(pointMap),
1786 void readProcAddressing
1809 Info<<
"Reading addressing from procXXXAddressing at "
1815 "cellProcAddressing",
1827 "faceProcAddressing",
1839 "pointProcAddressing",
1851 "boundaryProcAddressing",
1870 <<
"Read addressing inconsistent with mesh sizes" <<
nl
1872 <<
" addressing:" << cellProcAddressing.objectPath()
1873 <<
" size:" << cellProcAddressing.size() <<
nl
1878 <<
" addressing:" << pointProcAddressing.objectPath()
1879 <<
" size:" << pointProcAddressing.size()
1881 <<
" addressing:" << boundaryProcAddressing.objectPath()
1882 <<
" size:" << boundaryProcAddressing.size()
1887 distMap = createReconstructMap
1893 pointProcAddressing,
1894 boundaryProcAddressing
1900 void reconstructMeshFields
1995 void reconstructLagrangian
2001 const wordRes& selectedLagrangianFields
2011 if (cloudNames.size())
2013 if (!lagrangianReconstructorPtr)
2015 lagrangianReconstructorPtr.
reset
2027 *lagrangianReconstructorPtr;
2031 Info<<
"Reconstructing lagrangian fields for cloud "
2054 selectedLagrangianFields
2061 selectedLagrangianFields
2068 selectedLagrangianFields
2075 selectedLagrangianFields
2082 selectedLagrangianFields
2089 selectedLagrangianFields
2097 selectedLagrangianFields
2105 selectedLagrangianFields
2112 selectedLagrangianFields
2120 selectedLagrangianFields
2127 selectedLagrangianFields
2134 selectedLagrangianFields
2146 const wordRes& selectedLagrangianFields,
2180 selectedLagrangianFields
2187 selectedLagrangianFields
2194 selectedLagrangianFields
2203 selectedLagrangianFields
2210 selectedLagrangianFields
2217 selectedLagrangianFields
2226 selectedLagrangianFields
2233 selectedLagrangianFields
2240 selectedLagrangianFields
2249 selectedLagrangianFields
2256 selectedLagrangianFields
2263 selectedLagrangianFields
2272 selectedLagrangianFields
2279 selectedLagrangianFields
2286 selectedLagrangianFields
2295 selectedLagrangianFields
2302 selectedLagrangianFields
2309 selectedLagrangianFields
2315 void redistributeLagrangian
2319 const label nOldCells,
2326 if (!lagrangianReconstructorPtr)
2328 lagrangianReconstructorPtr.
reset
2340 lagrangianReconstructorPtr();
2471 int main(
int argc,
char *argv[])
2475 "Redistribute decomposed mesh and fields according"
2476 " to the decomposeParDict settings.\n"
2477 "Optionally run in decompose/reconstruct mode"
2493 "Test without writing the decomposition. "
2494 "Changes -cellDist to only write volScalarField."
2499 "Write cell distribution as a labelList - for use with 'manual' "
2500 "decomposition method or as a volScalarField for post-processing."
2505 "Only reconstruct new times (i.e. that do not exist already)"
2528 != fileOperations::uncollatedFileOperation::typeName
2541 writeHandler.
valid()
2556 const bool writeCellDist =
args.
found(
"cellDist");
2558 const bool newTimes =
args.
found(
"newTimes");
2560 bool decompose =
args.
found(
"decompose");
2561 bool overwrite =
args.
found(
"overwrite");
2575 const wordRes selectedLagrangianFields;
2580 Info<<
"Decomposing case (like decomposePar)" <<
nl <<
endl;
2584 <<
"Cannot specify both -decompose and -reconstruct"
2590 Info<<
"Reconstructing case (like reconstructParMesh)" <<
nl <<
endl;
2599 <<
"Working in decompose or reconstruction mode automatically"
2600 <<
" implies -overwrite" <<
nl <<
endl;
2609 <<
": This utility can only be run parallel"
2626 nfs = (roots.size() == 1);
2631 Info<<
"Detected multiple roots i.e. non-nfs running"
2644 Info<<
"Removing existing processor directory" << procDir <<
endl;
2654 Info<<
"No processor directories; switching on decompose mode"
2670 Info<<
"Creating time directories on all processors" <<
nl <<
endl;
2693 Info<<
"Creating time directories for undecomposed Time"
2694 <<
" on all processors" <<
nl <<
endl;
2699 Info<<
"Create undecomposed database"<<
nl <<
endl;
2715 for (
const instant& t : baseTimeDirs)
2717 masterTimeDirSet.
insert(t.name());
2746 if (timeDirs.empty())
2749 <<
"No times selected"
2759 <<
"Pass1 : reconstructing mesh and addressing" <<
nl <<
endl;
2778 baseRunTime.
setTime(timeDirs[timeI], timeI);
2812 bool haveAddressing =
false;
2833 "faceProcAddressing",
2847 haveAddressing =
true;
2853 haveAddressing =
true;
2860 bool haveUndecomposedMesh =
false;
2864 <<
" for undecomposed mesh" <<
endl;
2878 haveUndecomposedMesh = facesIO.headerOk();
2886 !haveUndecomposedMesh
2890 Info<<
"loading mesh from " << facesInstance <<
endl;
2906 setBasicGeometry(
mesh);
2912 Info<<
"Reconstructing mesh for time " << facesInstance
2915 label nDestProcs = 1;
2918 redistributeAndWrite
2920 std::move(writeHandler),
2946 <<
"Pass2 : reconstructing fields" <<
nl <<
endl;
2949 baseRunTime.
setTime(timeDirs[0], 0);
2957 Info<<
"Reading undecomposed mesh (on master)" <<
endl;
2970 setBasicGeometry(baseMeshPtr());
2973 Info<<
"Reading local, decomposed mesh" <<
endl;
2980 baseMeshPtr().facesInstance(),
3000 readProcAddressing(
mesh, baseMeshPtr, distMap);
3022 Info<<
" Detected initial mesh motion;"
3023 <<
" reconstructing points" <<
nl
3025 fvReconstructorPtr().reconstructPoints();
3032 if (newTimes && masterTimeDirSet.found(timeDirs[timeI].name()))
3034 Info<<
"Skipping time " << timeDirs[timeI].name()
3041 baseRunTime.
setTime(timeDirs[timeI], timeI);
3051 Info<<
" Dected mesh motion; reconstructing points" <<
nl
3053 fvReconstructorPtr().reconstructPoints();
3061 Info<<
" Detected topology change;"
3062 <<
" reconstructing addressing" <<
nl <<
endl;
3069 baseMeshPtr.
clear();
3084 readProcAddressing(
mesh, baseMeshPtr, distMap);
3087 fvReconstructorPtr.reset
3097 lagrangianReconstructorPtr.
clear();
3106 reconstructMeshFields
3108 fvReconstructorPtr(),
3114 reconstructLagrangian
3116 lagrangianReconstructorPtr,
3120 selectedLagrangianFields
3143 baseMeshPtr().time()
3176 Info<<
"Setting time to that of master or undecomposed case : "
3177 << masterTime <<
endl;
3179 baseRunTime.
setTime(masterTime, 0);
3215 Info<<
"Setting caseName to " << baseRunTime.
caseName()
3216 <<
" to find undecomposed mesh" <<
endl;
3232 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
3241 const boolList haveMesh(haveFacesFile(meshPath));
3268 Info<<
"Setting caseName to " << baseRunTime.
caseName()
3269 <<
" to read undecomposed mesh" <<
endl;
3288 if (writeHandler.
valid())
3301 for (
const auto proci : procs)
3306 && meshDir[proci] != meshDir[myProci]
3309 Info<<
"Deleting mesh dir:" << meshDir[proci]
3311 rmDir(meshDir[proci]);
3325 Info<<
"Restoring caseName to " << proc0CaseName <<
endl;
3340 determineDecomposition
3360 rmDir(
mesh.objectRegistry::objectPath());
3393 selectedLagrangianFields,
3406 std::move(writeHandler),
3423 redistributeLagrangian
3425 lagrangianReconstructorPtr,
static instantList findTimes(const fileName &directory, const word &constantName="constant")
static autoPtr< T > New(Args &&... args)
List< label > labelList
A List of labels.
const labelListList & subMap() const
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
label reconstructFvVolumeInternalFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
const fileName & globalCaseName() const
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
bool constructHasFlip() const
GeometricField< tensor, fvPatchField, volMesh > volTensorField
Defines the attributes of an object for which implicit objectRegistry management is supported,...
PtrList< labelIOList > & faceProcAddressing
autoPtr< fvMesh > loadOrCreateMesh(const bool decompose, const IOobject &io)
static constexpr int masterNo() noexcept
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
An encapsulation of filesystem-related operations.
label redistributeStoredFields(const mapDistributeBase &map, passivePositionParticleCloud &cloud) const
A class for handling file names.
A primitive field of type <T> with automated input and output.
virtual bool write(const bool valid=true) const
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
static word defaultRegion
T getOrDefault(const word &optName, const T &deflt) const
This boundary condition enables processor communication across patches.
A class for managing temporary objects.
Given the original mesh and the list of selected cells, it creates the mesh consisting only of the de...
static constexpr const zero Zero
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
int debugSwitch(const char *name, const int deflt=0)
Output inter-processor communications stream.
virtual const fvGeometryScheme & geometry() const
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
void distributeCellData(List< T > &lst) const
static std::string name(const std::string &str)
bool processorCase() const noexcept
static autoPtr< fileOperation > NewUncollated()
static word timeName(const scalar t, const int precision=precision_)
virtual void flush() const
const fileName & caseName() const
static void addNote(const string ¬e)
const functionObjectList & functionObjects() const
instantList select(const instantList ×) const
const fileName & facesInstance() const
void transfer(mapDistributePolyMesh &map)
static void waitRequests(const label start=0)
static bool master(const label communicator=worldComm)
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Extract command arguments and options from the supplied argc and argv parameters.
passivePositionParticleCloud but with autoMap and writing disabled. Only used for its objectRegistry ...
static void unset(bool verbose=false)
bool rm(const fileName &file)
const fileOperation & fileHandler()
bool valid() const noexcept
const polyBoundaryMesh & boundaryMesh() const
Ostream & endl(Ostream &os)
decompositionMethod & decomposer() const
const T * set(const label i) const
static commsTypes defaultCommsType
A Field of objects of type <T> with automated input and output using a compact storage....
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
writeOption writeOpt() const noexcept
A HashTable with keys but without contents that is similar to std::unordered_set.
static void removeFiles(const polyMesh &)
MeshObject wrapper of decompositionMethod.
Mesh consisting of general polyhedral cells.
virtual instantList findTimes(const fileName &, const word &) const
const labelList & processorPatches() const noexcept
label nPoints() const noexcept
const mapDistribute & cellMap() const
static const decompositionModel & New(const polyMesh &mesh, const fileName &decompDictFile="", const dictionary *fallback=nullptr)
Registry of regIOobjects.
virtual readUpdateState readUpdate()
static void findClouds(const fvMesh &, wordList &cloudNames, List< wordList > &objectNames)
label reconstructFvSurfaceFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
const fileName & pointsInstance() const
virtual bool parallelAware() const =0
static void noFunctionObjects(bool addWithOption=false)
label nCells() const noexcept
static rangeType subProcs(const label communicator=worldComm)
int dryRun() const noexcept
Generic templated field type.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Lagrangian field redistributor.
void setSize(const label n)
void removeFiles(const fileName &instanceDir) const
DynamicList< T, SizeMin > & append(const T &val)
const mapDistribute & faceMap() const
Class containing processor-to-processor mapping information.
const mapDistribute & patchMap() const
instantList times() const
label nBoundaryFaces() const noexcept
autoPtr< mapDistributeBase > redistributeLagrangianPositions(passivePositionParticleCloud &cloud) const
A List of objects of type <T> with automated input and output using a compact storage....
Neighbour processor patch.
static List< int > & procID(label communicator)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual bool rmDir(const fileName &dir, const bool silent=false) const =0
label max(const labelHashSet &set, label maxValue=labelMin)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Various for reading/decomposing/reconstructing/distributing refinement data.
static const Enum< commsTypes > commsTypeNames
static instantList selectIfPresent(Time &runTime, const argList &args)
const labelList & oldPatchSizes() const
#define forAllIters(container, iter)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & controlDict() const
const wordRes fieldNames(propsDict.getOrDefault< wordRes >("fields", wordRes()))
Generic dimensioned Type class.
Abstract base class for domain decomposition.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Mesh data needed to do the Finite Volume discretisation.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
errorManip< error > abort(error &err)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Inter-processor communication reduction functions.
List of IOobjects with searching and retrieving facilities.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
static void addDryRunOption(const string &usage, bool advanced=false)
static label nDomains(const dictionary &decompDict, const word ®ionName="")
errorManipArg< error, int > exit(error &err, const int errNo=1)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
A HashTable similar to std::unordered_map.
label nNonProcessor() const
GeometricField< vector, fvPatchField, volMesh > volVectorField
void reset(autoPtr< T > &&other) noexcept
const fvBoundaryMesh & boundary() const
label constructSize() const
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
static unsigned int defaultPrecision() noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & system() const
#define FatalErrorInFunction
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
virtual labelList decompose(const pointField &points, const scalarField &pointWeights) const
static rangeType allProcs(const label communicator=worldComm)
label reconstructFvVolumeFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
static int & msgType() noexcept
void removeEmptyDirs(const fileName &path)
static int myProcNo(const label communicator=worldComm)
static label readFields(const passivePositionParticleCloud &cloud, const IOobjectList &objects, const wordRes &selectedFields=wordRes())
bool rmDir(const fileName &directory, const bool silent=false)
Reconstructor for lagrangian positions and fields.
static void addOptions(const bool constant=true, const bool withZero=false)
const fileName & rootPath() const
static bool & parRun() noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual bool isFile(const fileName &, const bool checkGzip=true, const bool followLink=true) const =0
IOmapDistributePolyMesh is derived from mapDistributePolyMesh and IOobject to give the mapDistributeP...
virtual void setTime(const Time &t)
fileName::Type type(const fileName &name, const bool followLink=true)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
labelList identity(const label len, label start=0)
A List of wordRe with additional matching capabilities.
fileName globalPath() const
bool insert(const Key &key)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
const polyBoundaryMesh & patches
Class containing processor-to-processor mapping information.
word name(const expressions::valueTypeCode typeCode)
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
const Time & time() const
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const =0
Input inter-processor communications stream.
label nFaces() const noexcept
const mapDistribute & pointMap() const
An instant of time. Contains the time value and name.
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const globalMeshData & globalData() const
static tmp< fvGeometryScheme > New(const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
fileName objectPath() const
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search=true) const =0
const word & constant() const
Generic GeometricField class.
const labelListList & constructMap() const
IOobjectList lookupClass(const char *clsName) const
Foam::argList args(argc, argv)
bool mkDir(const fileName &pathName, mode_t mode=0777)
void distributePointData(List< T > &lst) const
static void removeFiles(const polyMesh &)
#define WarningInFunction
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
Foam::autoPtr< Foam::fvMesh > meshPtr(nullptr)
bool distributed() const noexcept
const Time & time() const noexcept
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
const fileName & rootPath() const noexcept
static label nProcs(const label communicator=worldComm)
Finite volume reconstructor for volume and surface fields.
const dimensionSet dimless
bool isDir(const fileName &name, const bool followLink=true)
bool found(const word &optName) const
Load or create (0 size) a mesh. Used in distributing meshes to a larger number of processors.
Functor to negate primitives. Dummy for most other types.
const labelIOList & tetBasePtIs() const