GAMGProcAgglomeration.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 | Copyright (C) 2013-2014 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::GAMGProcAgglomeration
26 
27 Description
28  Processor agglomeration of GAMGAgglomerations.
29 
30 SourceFiles
31  GAMGProcAgglomeration.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef GAMGProcAgglomeration_H
36 #define GAMGProcAgglomeration_H
37 
38 #include "runTimeSelectionTables.H"
39 #include "labelList.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class GAMGAgglomeration;
47 class lduMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class GAMGProcAgglomeration Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Reference to agglomeration
62 
63  // Protected Member Functions
64 
65  //- Debug: write agglomeration info
66  void printStats(Ostream& os, GAMGAgglomeration& agglom) const;
67 
68  //- Agglomerate a level. Return true if anything has changed
69  bool agglomerate
70  (
71  const label fineLevelIndex,
72  const labelList& procAgglomMap,
73  const labelList& masterProcs,
74  const List<label>& agglomProcIDs,
75  const label procAgglomComm
76  );
77 
78  //- Debug: calculate global cell-cells
79  static labelListList globalCellCells(const lduMesh&);
80 
81 private:
82 
83  // Private data
84 
85  // Private Member Functions
86 
87  //- Disallow default bitwise copy construct
89 
90  //- Disallow default bitwise assignment
91  void operator=(const GAMGProcAgglomeration&);
92 
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("GAMGProcAgglomeration");
98 
99 
100  // Declare run-time constructor selection tables
101 
102  //- Runtime selection table for pure geometric agglomerators
104  (
105  autoPtr,
108  (
109  GAMGAgglomeration& agglom,
110  const dictionary& controlDict
111  ),
112  (
113  agglom,
114  controlDict
115  )
116  );
117 
118 
119  // Constructors
120 
121  //- Construct given agglomerator and controls
123  (
124  GAMGAgglomeration& agglom,
125  const dictionary& controlDict
126  );
127 
128 
129  // Selectors
130 
131  //- Return the selected agglomerator
133  (
134  const word& type,
135  GAMGAgglomeration& agglom,
136  const dictionary& controlDict
137  );
138 
139 
140  //- Destructor
141  virtual ~GAMGProcAgglomeration();
142 
143 
144  // Member Functions
145 
146  //- Modify agglomeration. Return true if modified
147  virtual bool agglomerate() = 0;
148 
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
GAMGAgglomeration & agglom_
Reference to agglomeration.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:59
TypeName("GAMGProcAgglomeration")
Runtime type information.
static autoPtr< GAMGProcAgglomeration > New(const word &type, GAMGAgglomeration &agglom, const dictionary &controlDict)
Return the selected agglomerator.
A class for handling words, derived from string.
Definition: word.H:59
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
Processor agglomeration of GAMGAgglomerations.
declareRunTimeSelectionTable(autoPtr, GAMGProcAgglomeration, GAMGAgglomeration,(GAMGAgglomeration &agglom, const dictionary &controlDict),(agglom, controlDict))
Runtime selection table for pure geometric agglomerators.
virtual ~GAMGProcAgglomeration()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
Geometric agglomerated algebraic multigrid agglomeration class.
Namespace for OpenFOAM.