38 const fileName& decompDictFile,
40 const word& methodName
44 decompDictFile_(decompDictFile),
45 nDomainsOverride_(nDomains),
46 methodNameOverride_(methodName)
54 const bool writeCellDist,
60 Info<<
"\nCalculating distribution of cells. nCells = " 61 << mesh_.nCells() <<
endl;
71 dictionary& modelDict =
const_cast<decompositionModel&
>(model);
73 if (nDomainsOverride_ > 0)
77 word(
"numberOfSubdomains"),
83 if (!methodNameOverride_.empty())
95 if (model.readIfPresent(
"weightField", weightName))
102 mesh_.time().timeName(),
109 cellWeights = weights.primitiveField();
112 decompositionMethod& method = model.decomposer();
114 CompactListList<label> cellCells;
124 labelList cellToProc = method.decompose(mesh_, cellWeights);
126 Info<<
"\nFinished decomposition into " 127 << method.nDomains() <<
" domains in " 128 << decompositionTime.elapsedCpuTime() <<
" s" <<
nl <<
nl;
130 decompositionInformation info
171 info.printDetails(
Info);
174 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()
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...
static void calcCellCells(const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool global, CompactListList< label > &cellCells)
Helper: determine (local or global) cellCells from mesh.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void execute(const bool writeCellDist, const bool verbose=false)
Perform dry-run.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
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.
domainDecompositionDryRun(const IOobject &io, const fileName &decompDictFile="", const label nDomains=0, const word &methodName="")
Construct from components.