Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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::masterCoarsestGAMGProcAgglomeration
29
30Description
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
60SourceFiles
61 masterCoarsestGAMGProcAgglomeration.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef Foam_masterCoarsestGAMGProcAgglomeration_H
66#define Foam_masterCoarsestGAMGProcAgglomeration_H
67
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
74
75// Forward Declarations
78/*---------------------------------------------------------------------------*\
79 Class masterCoarsestGAMGProcAgglomeration Declaration
80\*---------------------------------------------------------------------------*/
81
82class masterCoarsestGAMGProcAgglomeration
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
98 masterCoarsestGAMGProcAgglomeration
99 (
100 const masterCoarsestGAMGProcAgglomeration&
101 ) = delete;
102
103 //- No copy assignment
104 void operator=(const masterCoarsestGAMGProcAgglomeration&) = delete;
105
106
107public:
108
109 //- Runtime type information
110 TypeName("masterCoarsest");
112
113 // Constructors
114
115 //- Construct given agglomerator and controls
116 masterCoarsestGAMGProcAgglomeration
117 (
118 GAMGAgglomeration& agglom,
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// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
Geometric agglomerated algebraic multigrid agglomeration class.
GAMGProcAgglomeration(const GAMGProcAgglomeration &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
TypeName("masterCoarsest")
Runtime type information.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
runTime controlDict().readEntry("adjustTimeStep"
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68