Scotch domain decomposition. More...
Public Member Functions | |
TypeName ("scotch") | |
scotchDecomp (const dictionary &decompDict, const word ®ionName="") | |
virtual | ~scotchDecomp ()=default |
virtual bool | parallelAware () const |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &agglom, const pointField ®ionPoints, const scalarField ®ionWeights) const |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights) const |
virtual labelList | decompose (const pointField &points, const scalarField &pointWeights) const |
virtual labelList | decompose (const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const=0 |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints, const scalarField ®ionWeights) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints) const |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights) const=0 |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc) const |
virtual labelList | decompose (const polyMesh &mesh, const scalarField &cellWeights, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections) const |
labelList | decompose (const polyMesh &mesh, const scalarField &cWeights) const |
![]() | |
virtual | ~metisLikeDecomp ()=default |
virtual labelList | decompose (const pointField &points, const scalarField &pointWeights) const |
virtual labelList | decompose (const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const=0 |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints, const scalarField ®ionWeights) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints) const |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights) const=0 |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc) const |
virtual labelList | decompose (const polyMesh &mesh, const scalarField &cellWeights, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections) const |
labelList | decompose (const polyMesh &mesh, const scalarField &cWeights) const |
![]() | |
TypeName ("decompositionMethod") | |
declareRunTimeSelectionTable (autoPtr, decompositionMethod, dictionary,(const dictionary &decompDict, const word ®ionName),(decompDict, regionName)) | |
decompositionMethod (const dictionary &decompDict, const word ®ionName="") | |
virtual | ~decompositionMethod ()=default |
label | nDomains () const noexcept |
virtual labelList | decompose (const pointField &points, const scalarField &pointWeights) const |
virtual labelList | decompose (const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const pointField &points) const |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints) const |
virtual labelList | decompose (const labelListList &globalCellCells, const pointField &cc) const |
void | setConstraints (const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const |
void | applyConstraints (const polyMesh &mesh, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &finalDecomp) const |
virtual labelList | decompose (const polyMesh &mesh, const scalarField &cellWeights, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections) const |
labelList | decompose (const polyMesh &mesh, const scalarField &cWeights) const |
Protected Member Functions | |
virtual label | decomposeSerial (const labelList &adjncy, const labelList &xadj, const List< scalar > &cWeights, labelList &decomp) const |
scotchDecomp (const scotchDecomp &)=delete | |
void | operator= (const scotchDecomp &)=delete |
![]() | |
virtual label | decomposeGeneral (const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const |
metisLikeDecomp (const metisLikeDecomp &)=delete | |
void | operator= (const metisLikeDecomp &)=delete |
metisLikeDecomp (const word &derivedType, const dictionary &decompDict, int select=selectionType::NULL_DICT) | |
metisLikeDecomp (const word &derivedType, const dictionary &decompDict, const word ®ionName, int select=selectionType::NULL_DICT) | |
![]() | |
const dictionary & | findCoeffsDict (const word &coeffsName, int select=selectionType::DEFAULT) const |
Additional Inherited Members | |
![]() | |
static label | nDomains (const dictionary &decompDict, const word ®ionName="") |
static const dictionary & | optionalRegionDict (const dictionary &decompDict, const word ®ionName) |
static autoPtr< decompositionMethod > | New (const dictionary &decompDict, const word ®ionName="") |
static void | calcCellCells (const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool global, CompactListList< label > &cellCells) |
static void | calcCellCells (const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells, CompactListList< scalar > &cellCellWeights) |
![]() | |
enum | selectionType { DEFAULT = 0, EXACT = 1, MANDATORY = 2, NULL_DICT = 4 } |
![]() | |
static const dictionary & | findCoeffsDict (const dictionary &dict, const word &coeffsName, int select=selectionType::DEFAULT) |
![]() | |
const dictionary & | coeffsDict_ |
![]() | |
const dictionary & | decompDict_ |
const dictionary & | decompRegionDict_ |
label | nDomains_ |
PtrList< decompositionConstraint > | constraints_ |
Scotch domain decomposition.
When run in parallel will collect the whole graph on to the master, decompose and send back. Use ptscotchDecomp for proper distributed decomposition.
Coefficients dictionary: scotchCoeffs, coeffs.
Quoting from the Scotch forum, on the 2008-08-22 10:09, Francois PELLEGRINI posted the following details:
RE: Graph mapping 'strategy' string Strategy handling in Scotch is a bit tricky. In order not to be confused, you must have a clear view of how they are built. Here are some rules: 1- Strategies are made up of "methods" which are combined by means of "operators". 2- A method is of the form "m{param=value,param=value,...}", where "m" is a single character (this is your first error: "f" is a method name, not a parameter name). 3- There exist different sort of strategies : bipartitioning strategies, mapping strategies, ordering strategies, which cannot be mixed. For instance, you cannot build a bipartitioning strategy and feed it to a mapping method (this is your second error). To use the "mapCompute" routine, you must create a mapping strategy, not a bipartitioning one, and so use stratGraphMap() and not stratGraphBipart(). Your mapping strategy should however be based on the "recursive bipartitioning" method ("b"). For instance, a simple (and hence not very efficient) mapping strategy can be : "b{sep=f}" which computes mappings with the recursive bipartitioning method "b", this latter using the Fiduccia-Mattheyses method "f" to compute its separators. If you want an exact partition (see your previous post), try "b{sep=fx}". However, these strategies are not the most efficient, as they do not make use of the multi-level framework. To use the multi-level framework, try for instance: "b{sep=m{vert=100,low=h,asc=f}x}" The current default mapping strategy in Scotch can be seen by using the "-vs" option of program gmap. It is, to date: r { job=t, map=t, poli=S, sep= ( m { asc=b { bnd= ( d{pass=40,dif=1,rem=1} | ) f{move=80,pass=-1,bal=0.002491}, org=f{move=80,pass=-1,bal=0.002491}, width=3 }, low=h{pass=10} f{move=80,pass=-1,bal=0.002491}, type=h, vert=80, rat=0.8 } | m { asc=b { bnd= ( d{pass=40,dif=1,rem=1} | ) f{move=80,pass=-1,bal=0.002491}, org=f{move=80,pass=-1,bal=0.002491}, width=3 }, low=h{pass=10} f{move=80,pass=-1,bal=0.002491}, type=h, vert=80, rat=0.8 } ) }
Given that this information was written in 2008, this example strategy will unlikely work as-is with the more recent Scotch versions. Therefore, the steps for getting the current default strategy from within Scotch, is to do the following steps:
Edit the file system/decomposeParDict
and use the following settings:
method scotch; scotchCoeffs { writeGraph true; }
Run decomposePar
. For example, it will write a file named region0.grf
.
Now, instead of using gmap
, run gpart
with the following command structure to get the default strategy:
gpart \<nProcs\> -vs \<grfFile\>
where:
writeGraph=true
, namely region0.grf
. numberOfSubdomains
defined in the dictionary file. At the end of the execution will be shown a long string, similar to the following example (complete line was cropped at [...]
):
S Strat=m{asc=b{width=3,bnd=d{pass=40,dif=1,rem=0}[...],type=h}
Edit the file system/decomposeParDict
once again and add the strategy
entry as exemplified:
method scotch; scotchCoeffs { //writeGraph true; strategy "m{asc=b{width=3,bnd=d{pass=40,dif=1,rem=0}[...],type=h}"; }
Finally, run decomposePar
once again, to at least test if it works as intended.
gpart
can be found in the current search path by adding the respective bin
folder from the Scotch installation, namely by running the following commands:source $(foamEtcFile config.sh/scotch) export PATH=$PATH:$SCOTCH_ARCH_PATH/bin
Definition at line 226 of file scotchDecomp.H.
|
protecteddelete |
|
explicit |
Definition at line 71 of file dummyScotchDecomp.C.
|
virtualdefault |
|
protectedvirtual |
Implements metisLikeDecomp.
Definition at line 53 of file dummyScotchDecomp.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and notImplementedMessage.
|
protecteddelete |
TypeName | ( | "scotch" | ) |
|
inlinevirtual |
Implements decompositionMethod.
Definition at line 280 of file scotchDecomp.H.
|
virtual |
Reimplemented from metisLikeDecomp.
Definition at line 83 of file dummyScotchDecomp.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and notImplementedMessage.
|
virtual |
Reimplemented from metisLikeDecomp.
Definition at line 97 of file dummyScotchDecomp.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and notImplementedMessage.
|
virtual |
Reimplemented from metisLikeDecomp.
Definition at line 112 of file dummyScotchDecomp.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and notImplementedMessage.
Foam::labelList decompose |
Definition at line 1318 of file decompositionMethod.C.
Foam::labelList decompose |
Definition at line 1329 of file decompositionMethod.C.
virtual labelList decompose |
Foam::labelList decompose |
Definition at line 377 of file decompositionMethod.C.
Foam::labelList decompose |
Definition at line 389 of file decompositionMethod.C.
Foam::labelList decompose |
Definition at line 430 of file decompositionMethod.C.
virtual labelList decompose |
Foam::labelList decompose |
Definition at line 449 of file decompositionMethod.C.
Foam::labelList decompose |
Definition at line 860 of file decompositionMethod.C.
Foam::labelList decompose |
Definition at line 1264 of file decompositionMethod.C.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.