metisDecomp.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2015 OpenFOAM Foundation
9 Copyright (C) 2017-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::metisDecomp
29
30Description
31 Metis domain decomposition
32
33 When run in parallel will collect the entire graph on to the master,
34 decompose and send back.
35
36 Coefficients dictionary: \a metisCoeffs, \a coeffs.
37
38 \verbatim
39 numberOfSubdomains N;
40 method metis;
41
42 metisCoeffs
43 {
44 method recursive; // k-way
45 options ( ...);
46 processorWeights ( ... );
47 }
48 \endverbatim
49
50 Method coefficients:
51 \table
52 Property | Description | Required | Default
53 method | recursive / k-way | no | recursive
54 options | metis options | no
55 processorWeights | list of weighting per partition | no
56 \endtable
57
58SourceFiles
59 metisDecomp.C
60
61\*---------------------------------------------------------------------------*/
62
63#ifndef metisDecomp_H
64#define metisDecomp_H
65
66#include "metisLikeDecomp.H"
67
68namespace Foam
69{
70
71/*---------------------------------------------------------------------------*\
72 Class metisDecomp Declaration
73\*---------------------------------------------------------------------------*/
74
75class metisDecomp
76:
77 public metisLikeDecomp
78{
79protected:
80
81 // Protected Member Functions
82
83 //- Decompose non-parallel
84 virtual label decomposeSerial
85 (
86 const labelList& adjncy,
87 const labelList& xadj,
88 const List<scalar>& cellWeights,
89 labelList& decomp
90 ) const;
91
93 //- No copy construct
94 metisDecomp(const metisDecomp&) = delete;
95
96 //- No copy assignment
97 void operator=(const metisDecomp&) = delete;
98
99
100public:
101
102 //- Runtime type information
103 TypeName("metis");
104
105
106 // Constructors
107
108 //- Construct given decomposition dictionary and optional region name
109 explicit metisDecomp
110 (
111 const dictionary& decompDict,
112 const word& regionName = ""
113 );
115
116 //- Destructor
117 virtual ~metisDecomp() = default;
118
119
120 // Member Functions
121
122 virtual bool parallelAware() const
123 {
124 return true;
125 }
126};
127
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace Foam
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135#endif
136
137// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Metis domain decomposition.
Definition: metisDecomp.H:95
TypeName("metis")
Runtime type information.
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const
Decompose non-parallel.
void operator=(const metisDecomp &)=delete
No copy assignment.
virtual bool parallelAware() const
Is method parallel aware?
Definition: metisDecomp.H:139
virtual ~metisDecomp()=default
Destructor.
metisDecomp(const metisDecomp &)=delete
No copy construct.
Domain decomposition using METIS-like data structures.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Foam::word regionName(Foam::polyMesh::defaultRegion)
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73