masterCoarsestGAMGProcAgglomeration.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) 2013 OpenFOAM Foundation
9  Copyright (C) 2022-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::masterCoarsestGAMGProcAgglomeration
29 
30 Description
31  Processor agglomeration of GAMGAgglomerations.
32 
33  - by default agglomerates onto the master processor
34  - optionally have multiple masters through the nProcessorsPerMaster
35  parameter. e.g.
36 
37  p
38  {
39  solver GAMG;
40  tolerance 1e-06;
41  relTol 0.1;
42  smoother GaussSeidel;
43 
44  nCellsInCoarsestLevel 10;
45 
46  processorAgglomerator masterCoarsest;
47  // Groups of 32 cores get combined so each 'master' gets
48  // (roughly) 32*nCellsInCoarsestLevel cells.
49  nProcessorsPerMaster 32;
50 
51  // Alternative : specify number of (equi-distributed) masters
52  nMasters 2;
53 
54  // Restart local agglomeration after processor agglomeration. Used
55  // as nCellsInCoarsestLevel. Only applicable for pair-wise local
56  // agglomeration methods.
57  nCellsInMasterLevel 1;
58  }
59 
60 SourceFiles
61  masterCoarsestGAMGProcAgglomeration.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef Foam_masterCoarsestGAMGProcAgglomeration_H
66 #define Foam_masterCoarsestGAMGProcAgglomeration_H
67 
68 #include "GAMGProcAgglomeration.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 // Forward Declarations
76 class GAMGAgglomeration;
77 
78 /*---------------------------------------------------------------------------*\
79  Class masterCoarsestGAMGProcAgglomeration Declaration
80 \*---------------------------------------------------------------------------*/
81 
83 :
85 {
86  // Private Data
87 
88  label nProcessorsPerMaster_;
89 
90  const label nCellsInMasterLevel_;
91 
92  DynamicList<label> comms_;
93 
94 
95  // Private Member Functions
96 
97  //- No copy construct
99  (
101  ) = delete;
102 
103  //- No copy assignment
104  void operator=(const masterCoarsestGAMGProcAgglomeration&) = delete;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("masterCoarsest");
111 
112 
113  // Constructors
114 
115  //- Construct given agglomerator and controls
117  (
118  GAMGAgglomeration& agglom,
119  const dictionary& controlDict
120  );
121 
122 
123  //- Destructor
125 
126 
127  // Member Functions
128 
129  //- Modify agglomeration. Return true if modified
130  virtual bool agglomerate();
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName("masterCoarsest")
Runtime type information.
Processor agglomeration of GAMGAgglomerations.
runTime controlDict().readEntry("adjustTimeStep"
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
Definition: debug.C:142
Processor agglomeration of GAMGAgglomerations.
Geometric agglomerated algebraic multigrid agglomeration class.
Namespace for OpenFOAM.