mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: region-wise decomposition specification for decomposeParDict
Within decomposeParDict, it is now possible to specify a different decomposition method, methods coefficients or number of subdomains for each region individually. The top-level numberOfSubdomains remains mandatory, since this specifies the number of domains for the entire simulation. The individual regions may use the same number or fewer domains. Any optional method coefficients can be specified in a general "coeffs" entry or a method-specific one, eg "metisCoeffs". For multiLevel, only the method-specific "multiLevelCoeffs" dictionary is used, and is also mandatory. ---- ENH: shortcut specification for multiLevel. In addition to the longer dictionary form, it is also possible to use a shorter notation for multiLevel decomposition when the same decomposition method applies to each level.
This commit is contained in:
@ -330,7 +330,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
forAll(regionNames, regioni)
|
||||
{
|
||||
const word& regionName = regionNames[regioni];
|
||||
@ -338,13 +337,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "\n\nDecomposing mesh " << regionName << nl << endl;
|
||||
|
||||
|
||||
// Determine the existing processor count directly
|
||||
label nProcs = fileHandler().nProcs(runTime.path(), regionDir);
|
||||
|
||||
// Get requested numberOfSubdomains. Note: have no mesh yet so
|
||||
// cannot use decompositionModel::New
|
||||
const label nDomains = readLabel
|
||||
// Get requested numberOfSubdomains directly from the dictionary.
|
||||
// Note: have no mesh yet so cannot use decompositionModel::New
|
||||
const label nDomains = decompositionMethod::nDomains
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
@ -362,7 +360,7 @@ int main(int argc, char *argv[])
|
||||
),
|
||||
decompDictFile
|
||||
)
|
||||
).lookup("numberOfSubdomains")
|
||||
)
|
||||
);
|
||||
|
||||
if (decomposeFieldsOnly)
|
||||
|
||||
Reference in New Issue
Block a user