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;
72 dictionary& modelDict =
const_cast<decompositionModel&
>(model);
74 if (nDomainsOverride_ > 0)
78 word(
"numberOfSubdomains"),
84 if (!methodNameOverride_.empty())
96 if (model.readIfPresent(
"weightField", weightName))
103 mesh_.time().timeName(),
110 cellWeights = weights.primitiveField();
113 decompositionMethod& method = model.decomposer();
115 CompactListList<label> cellCells;
125 labelList cellToProc = method.decompose(mesh_, cellWeights);
127 Info<<
"\nFinished decomposition into " 128 << method.nDomains() <<
" domains in " 129 << decompositionTime.elapsedCpuTime() <<
" s" <<
nl <<
nl;
131 decompositionInformation info
172 info.printDetails(
Info);
175 info.printSummary(
Info);
constexpr char nl
The newline '\n' character (0x0a)
static void calcCellCells(const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
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...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void execute(const bool writeCellDist, const bool verbose=false)
Perform dry-run.
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...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
cpuTimePosix cpuTime
Selection of preferred clock mechanism for the elapsed cpu time.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void writeVTK(OFstream &os, const Type &value)
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
domainDecompositionDryRun(const IOobject &io, const fileName &decompDictFile="", const label nDomains=0, const word &methodName="")
Construct from components.