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:
Mark Olesen
2017-11-09 12:30:24 +01:00
parent 69ea4976ac
commit a9ffcab5af
211 changed files with 2416 additions and 3933 deletions

View File

@ -15,10 +15,174 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 2;
//- The total number of domains (mandatory)
numberOfSubdomains 256;
//- The decomposition method (mandatory)
method scotch;
// method hierarchical;
// method simple;
// method metis;
// method manual;
// method multiLevel;
// method structured; // does 2D decomposition of structured mesh
// Optional decomposition constraints
//- Optional region-wise decomposition.
// Can specify a different method.
// The number of subdomains can be less than the top-level numberOfSubdomains.
regions
{
water
{
numberOfSubdomains 128;
method metis;
}
".*solid"
{
numberOfSubdomains 4;
method metis;
}
heater
{
numberOfSubdomains 1;
method none;
}
}
// Coefficients for the decomposition method are either as a
// general "coeffs" dictionary or method-specific "<method>Coeffs".
// For multiLevel, using multiLevelCoeffs only.
multiLevelCoeffs
{
// multiLevel decomposition methods to apply in turn.
// This is like hierarchical but fully general
// - every method can be used at every level.
// Only sub-dictionaries containing the keyword "method" are used.
//
level0
{
numberOfSubdomains 16;
method scotch;
}
level1
{
numberOfSubdomains 2;
method scotch;
coeffs
{
n (2 1 1);
delta 0.001;
}
}
level2
{
numberOfSubdomains 8;
// method simple;
method scotch;
}
}
multiLevelCoeffs
{
// Compact multiLevel specification, activated by the presence of the
// keywords "method" and "domains"
method scotch;
domains (16 2 8);
//// Or with implicit '16' for the first level with numberOfSubdomains=256
//domains (2 8);
}
// Other example coefficents
simpleCoeffs
{
n (2 1 1);
// delta 0.001; //< default value = 0.001
}
hierarchicalCoeffs
{
n (1 2 1);
// delta 0.001; //< default value = 0.001
// order xyz; //< default order = xyz
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
structuredCoeffs
{
// Patches to do 2D decomposition on. Structured mesh only; cells have
// to be in 'columns' on top of patches.
patches (movingWall);
// Method to use on the 2D subset
method scotch;
}
//- Use the volScalarField named here as a weight for each cell in the
// decomposition. For example, use a particle population field to decompose
// for a balanced number of particles in a lagrangian simulation.
// weightField dsmcRhoNMean;
//// Is the case distributed? Note: command-line argument -roots takes
//// precedence
//distributed yes;
//
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Decomposition constraints
//constraints
//{
// preserveBaffles
@ -88,107 +252,4 @@ numberOfSubdomains 2;
//preserveBaffles true;
//- Use the volScalarField named here as a weight for each cell in the
// decomposition. For example, use a particle population field to decompose
// for a balanced number of particles in a lagrangian simulation.
// weightField dsmcRhoNMean;
method scotch;
//method hierarchical;
// method simple;
// method metis;
// method manual;
// method multiLevel;
// method structured; // does 2D decomposition of structured mesh
multiLevelCoeffs
{
// Decomposition methods to apply in turn. This is like hierarchical but
// fully general - every method can be used at every level.
level0
{
numberOfSubdomains 64;
//method simple;
//simpleCoeffs
//{
// n (2 1 1);
// delta 0.001;
//}
method scotch;
}
level1
{
numberOfSubdomains 4;
method scotch;
}
}
// Desired output
simpleCoeffs
{
n (2 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 2 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
structuredCoeffs
{
// Patches to do 2D decomposition on. Structured mesh only; cells have
// to be in 'columns' on top of patches.
patches (movingWall);
// Method to use on the 2D subset
method scotch;
}
//// Is the case distributed? Note: command-line argument -roots takes
//// precedence
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //