「DecomposeParDictの中身」の版間の差分

提供:オープンCAEWiki OpenCAE Wiki
ナビゲーションに移動 検索に移動
(ページの作成:「decomposeParDictのサンプルは、 <OpenFOAMのインストールフォルダ>/applications/utilities/parallelProcessing/decomposePar/decomposeParDict に置いてあ...」)
 
(相違点なし)

2018年10月16日 (火) 20:24時点における最新版

decomposeParDictのサンプルは、 <OpenFOAMのインストールフォルダ>/applications/utilities/parallelProcessing/decomposePar/decomposeParDict に置いてある。

各パラメータについてはコメントで説明されている。

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1806                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    note        "mesh decomposition control dictionary";
    object      decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- 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 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 coefficients
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
//    {
//        //- Keep owner and neighbour of baffles on same processor (i.e.
//        // keep it detectable as a baffle). Baffles are two boundary face
//        // sharing the same points
//        type    preserveBaffles;
//    }
//    preserveFaceZones
//    {
//        //- Keep owner and neighbour on same processor for faces in zones
//        type    preserveFaceZones;
//        zones   (".*");
//    }
//    preservePatches
//    {
//        //- Keep owner and neighbour on same processor for faces in patches
//        //  (only makes sense for cyclic patches. Not suitable for e.g.
//        //   cyclicAMI since these are not coupled on the patch level. Use
//        //   singleProcessorFaceSets for those)
//        type    preservePatches;
//        patches (".*");
//    }
//    singleProcessorFaceSets
//    {
//        //- Keep all of faceSet on a single processor. This puts all cells
//        //  connected with a point, edge or face on the same processor.
//        //  (just having face connected cells might not guarantee a balanced
//        //  decomposition)
//        // The processor can be -1 (the decompositionMethod chooses the
//        // processor for a good load balance) or explicitly provided (upsets
//        // balance)
//        type    singleProcessorFaceSets;
//        singleProcessorFaceSets ((f1 -1));
//    }
//    refinementHistory
//    {
//        //- Decompose cells such that all cell originating from single cell
//        //  end up on same processor
//        type    refinementHistory;
//    }
//}
// Deprecated form of specifying decomposition constraints:
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
//- Keep owner and neighbour on same processor for faces in patches:
//  (makes sense only for cyclic patches. Not suitable for e.g. cyclicAMI
//   since these are not coupled on the patch level. Use
//   singleProcessorFaceSets for those)
//preservePatches (cyclic_half0 cyclic_half1);
//- Keep all of faceSet on a single processor. This puts all cells
//  connected with a point, edge or face on the same processor.
//  (just having face connected cells might not guarantee a balanced
//  decomposition)
// The processor can be -1 (the decompositionMethod chooses the processor
// for a good load balance) or explicitly provided (upsets balance).
//singleProcessorFaceSets ((f0 -1));
//- Keep owner and neighbour of baffles on same processor (i.e. keep it
//  detectable as a baffle). Baffles are two boundary face sharing the
//  same points.
//preserveBaffles true;
// ************************************************************************* //