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-2019 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 agglomeration of GAMGAgglomerations.
29 
30  In the GAMG control dictionary:
31 
32  processorAgglomerator manual;
33  // List of level+procagglomeration where
34  // procagglomeration is a set of labelLists. Each labelList is
35  // a cluster of processor which gets combined onto the first element
36  // in the list.
37  processorAgglomeration
38  (
39  (
40  3 // at level 3
41  (
42  (0 1) // coarse 0 from 0,1 (and moved onto 0)
43  (3 2) // coarse 1 from 2,3 (and moved onto 3)
44  )
45  )
46  (
47  6 // at level6
48  (
49  (0 1) // coarse 0 from 0,1 (and moved onto 0)
50  )
51  )
52  );
53 
54 SourceFiles
55  manualGAMGProcAgglomeration.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef manualGAMGProcAgglomeration_H
60 #define manualGAMGProcAgglomeration_H
61 
62 #include "GAMGProcAgglomeration.H"
63 #include "DynamicList.H"
64 #include "Tuple2.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 
71 class GAMGAgglomeration;
72 
73 /*---------------------------------------------------------------------------*\
74  Class manualGAMGProcAgglomeration Declaration
75 \*---------------------------------------------------------------------------*/
76 
78 :
80 {
81  // Private Data
82 
83  //- Per level the agglomeration map
84  const List<Tuple2<label, List<labelList>>> procAgglomMaps_;
85 
86  //- Any allocated communicators
87  DynamicList<label> comms_;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("manual");
94 
95 
96  // Constructors
97 
98  //- Construct given agglomerator and controls
100  (
101  GAMGAgglomeration& agglom,
102  const dictionary& controlDict
103  );
104 
105  //- Disallow default bitwise copy construction
107  (
109  );
110 
111 
112  //- Destructor
114 
115 
116  // Member Functions
117 
118  //- Modify agglomeration. Return true if modified
119  virtual bool agglomerate();
120 
121 
122  // Member Operators
123 
124  //- Disallow default bitwise assignment
125  void operator=(const manualGAMGProcAgglomeration&) = delete;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
Manual processor agglomeration of GAMGAgglomerations.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
void operator=(const manualGAMGProcAgglomeration &)=delete
Disallow default bitwise assignment.
manualGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &controlDict)
Construct given agglomerator and controls.
TypeName("manual")
Runtime type information.
Processor agglomeration of GAMGAgglomerations.
Geometric agglomerated algebraic multigrid agglomeration class.
Namespace for OpenFOAM.