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 = "
71 dictionary& modelDict =
const_cast<decompositionModel&
>(model);
73 if (nDomainsOverride_ > 0)
77 word(
"numberOfSubdomains"),
83 if (!methodNameOverride_.empty())
95 if (model.readIfPresent(
"weightField", weightName))
109 cellWeights = weights.primitiveField();
112 decompositionMethod& method = model.decomposer();
114 CompactListList<label> cellCells;
115 decompositionMethod::calcCellCells
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
141 writeVTK(
"cellDist", cellToProc);
171 info.printDetails(
Info);
174 info.printSummary(
Info);
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Testing of domain decomposition for finite-volume meshes.
virtual bool execute()
Calculate the output fields.
const Time & time() const
Return the top-level database.
label nCells() const noexcept
Number of mesh cells.
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)
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
cpuTimeCxx cpuTime
Selection of preferred clock mechanism for the elapsed cpu time.
constexpr char nl
The newline '\n' character (0x0a)