Loading...
Searching...
No Matches
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-2023 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 Foam_metisDecomp_H
64#define Foam_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
92
93public:
94
95 // Generated Methods
96
97 //- No copy construct
98 metisDecomp(const metisDecomp&) = delete;
99
100 //- No copy assignment
101 void operator=(const metisDecomp&) = delete;
102
103
104 //- Runtime type information
105 TypeName("metis");
106
107
108 // Constructors
109
110 //- Construct with number of domains (no coefficients or constraints)
111 explicit metisDecomp(const label numDomains);
112
113 //- Construct given decomposition dictionary and optional region name
114 explicit metisDecomp
116 const dictionary& decompDict,
117 const word& regionName = ""
118 );
119
121 //- Destructor
122 virtual ~metisDecomp() = default;
123
124
125 // Member Functions
127 //- Knows about coupled boundaries
128 virtual bool parallelAware() const
129 {
130 return true;
131 }
132};
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Metis domain decomposition.
Definition metisDecomp.H:91
TypeName("metis")
Runtime type information.
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const
Decompose non-parallel.
Definition metisDecomp.C:67
void operator=(const metisDecomp &)=delete
No copy assignment.
virtual bool parallelAware() const
Knows about coupled boundaries.
virtual ~metisDecomp()=default
Destructor.
metisDecomp(const metisDecomp &)=delete
No copy construct.
Domain decomposition using METIS-like data structures.
metisLikeDecomp(const metisLikeDecomp &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Definition word.H:66
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68