manualGAMGProcAgglomeration.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2013-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::manualGAMGProcAgglomeration
26 
27 Description
28  Manual processor agglomerator
29 
30  In the GAMG control dictionary:
31 
32 Usage
33  Example of manual processor agglomeration
34  \verbatim
35  processorAgglomeration
36  {
37  agglomerator manual;
38 
39  // List of level + list of processor clusters
40  //
41  // Each cluster of processor is specified as a list of IDs which are
42  // merged onto the first element in the list.
43 
44  processorAgglomeration
45  (
46  (
47  3 // at level 3
48  (
49  (0 1) // coarse 0 from 0,1 (and moved onto 0)
50  (3 2) // coarse 1 from 2,3 (and moved onto 3)
51  )
52  )
53  (
54  6 // at level6
55  (
56  (0 1) // coarse 0 from 0,1 (and moved onto 0)
57  )
58  )
59  );
60  }
61  \endverbatim
62 
63 SourceFiles
64  manualGAMGProcAgglomeration.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef manualGAMGProcAgglomeration_H
69 #define manualGAMGProcAgglomeration_H
70 
71 #include "GAMGProcAgglomeration.H"
72 #include "DynamicList.H"
73 #include "Tuple2.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 
80 class GAMGAgglomeration;
81 
82 /*---------------------------------------------------------------------------*\
83  Class manualGAMGProcAgglomeration Declaration
84 \*---------------------------------------------------------------------------*/
85 
87 :
89 {
90  // Private Data
91 
92  //- Per level the agglomeration map
93  const List<Tuple2<label, List<labelList>>> procAgglomMaps_;
94 
95  //- Any allocated communicators
96  DynamicList<label> comms_;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("manual");
103 
104 
105  // Constructors
106 
107  //- Construct given agglomerator and controls
109  (
110  GAMGAgglomeration& agglom,
111  const dictionary& dict
112  );
113 
114  //- Disallow default bitwise copy construction
116  (
118  ) = delete;
119 
120 
121  //- Destructor
123 
124 
125  // Member Functions
126 
127  //- Modify agglomeration. Return true if modified
128  virtual bool agglomerate();
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const manualGAMGProcAgglomeration&) = delete;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
TypeName("manual")
Runtime type information.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
manualGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &dict)
Construct given agglomerator and controls.
void operator=(const manualGAMGProcAgglomeration &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.
dictionary dict