39 const fileName& decompDictFile,
41 const word& methodName
45 decompDictFile_(decompDictFile),
46 nDomainsOverride_(nDomains),
47 methodNameOverride_(methodName)
55 const bool writeCellDist,
61 Info<<
"\nCalculating distribution of cells. nCells = " 62 << mesh_.nCells() <<
endl;
67 dictionary& modelDict =
const_cast<decompositionModel&
>(model);
69 if (nDomainsOverride_ > 0)
73 word(
"numberOfSubdomains"),
79 if (!methodNameOverride_.empty())
90 if (word
name; model.readIfPresent(
"weightField",
name))
97 mesh_.time().timeName(),
105 cellWeights = std::move(weights.primitiveFieldRef(
false));
108 const auto& decomposer = model.decomposer();
111 CompactListList<label> cellCells;
114 labelList cellToProc = decomposer.decompose(mesh_, cellWeights);
116 Info<<
"\nFinished decomposition into " 117 << decomposer.nDomains() <<
" domains in " 118 << decompositionTime.elapsedCpuTime() <<
" s" <<
nl <<
nl;
120 decompositionInformation info
124 decomposer.nDomains()
161 info.printDetails(
Info);
164 info.printSummary(
Info);
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void execute(const bool writeCellDist, const bool verbose=false)
Perform dry-run.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static const decompositionModel & New(const polyMesh &mesh, const fileName &decompDictFile="", const dictionary *fallback=nullptr)
Read and register on mesh, optionally with alternative decomposeParDict path/name or with fallback co...
cpuTimePosix cpuTime
Selection of preferred clock mechanism for the elapsed cpu time.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static void calcCellCells(const polyMesh &mesh, const labelUList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
void writeVTK(OFstream &os, const Type &value)
List< label > labelList
A List of labels.
domainDecompositionDryRun(const IOobject &io, const fileName &decompDictFile="", const label nDomains=0, const word &methodName="")
Construct from components.
Do not request registration (bool: false)