allGAMGProcAgglomeration.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-2026 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::allGAMGProcAgglomeration
26 
27 Description
28  Agglomerates all processor matrices onto the master processor at the
29  coarsest but one level.
30 
31  It would be more logical and useful if the agglomeration onto the master
32  took place at the coarsest level, providing a means to iteratively solve the
33  coarsest matrix without the need for communication, but due to a programming
34  limitation of the current implementation the agglomeration takes place at
35  the next finer level. It would make more sense if this processor
36  agglomerator were replaced by an \c iterativelySolveCoarsest option, similar
37  to the current directSolveCoarsest option but which constructs a single
38  lduMatrix which is solved using one of the CG iterative solvers.
39 
40 Usage
41  Example of GAMG solver settings with all processor agglomeration
42  \verbatim
43  p
44  {
45  solver GAMG;
46  smoother GaussSeidel;
47 
48  processorAgglomeration
49  {
50  agglomerator all;
51  }
52 
53  tolerance 1e-8;
54  relTol 0;
55  }
56  \endverbatim
57 
58 SourceFiles
59  allGAMGProcAgglomeration.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef allGAMGProcAgglomeration_H
64 #define allGAMGProcAgglomeration_H
65 
66 #include "GAMGProcAgglomeration.H"
67 #include "DynamicList.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class allGAMGProcAgglomeration Declaration
76 \*---------------------------------------------------------------------------*/
77 
79 :
81 {
82  // Private Data
83 
84  //- List of communicators
85  DynamicList<label> comms_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("all");
92 
93 
94  // Constructors
95 
96  //- Construct given agglomerator and controls
98  (
99  GAMGAgglomeration& agglom,
100  const dictionary& dict
101  );
102 
103  //- Disallow default bitwise copy construction
105  (
107  ) = delete;
108 
109 
110  //- Destructor
111  virtual ~allGAMGProcAgglomeration();
112 
113 
114  // Member Functions
115 
116  //- Modify agglomeration. Return true if modified
117  virtual bool agglomerate();
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const allGAMGProcAgglomeration&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
Agglomerates all processor matrices onto the master processor at the coarsest but one level.
allGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &dict)
Construct given agglomerator and controls.
virtual ~allGAMGProcAgglomeration()
Destructor.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
void operator=(const allGAMGProcAgglomeration &)=delete
Disallow default bitwise assignment.
TypeName("all")
Runtime type information.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Namespace for OpenFOAM.
dictionary dict