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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2014 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::GAMGProcAgglomeration
28
29Description
30 Processor agglomeration of GAMGAgglomerations.
31
32SourceFiles
33 GAMGProcAgglomeration.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef GAMGProcAgglomeration_H
38#define GAMGProcAgglomeration_H
39
41#include "labelList.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48class GAMGAgglomeration;
49class lduMesh;
50
51/*---------------------------------------------------------------------------*\
52 Class GAMGProcAgglomeration Declaration
53\*---------------------------------------------------------------------------*/
56{
57
58protected:
59
60 // Protected data
61
62 //- Reference to agglomeration
64
65 // Protected Member Functions
66
67 //- Debug: write agglomeration info
68 void printStats(Ostream& os, GAMGAgglomeration& agglom) const;
69
70 //- Agglomerate a level. Return true if anything has changed
71 bool agglomerate
72 (
73 const label fineLevelIndex,
74 const labelList& procAgglomMap,
75 const labelList& masterProcs,
76 const List<label>& agglomProcIDs,
77 const label procAgglomComm
78 );
79
80 //- Debug: calculate global cell-cells
82
83private:
84
85 // Private data
86
87 // Private Member Functions
88
89 //- No copy construct
91
92 //- No copy assignment
93 void operator=(const GAMGProcAgglomeration&) = delete;
94
95
96public:
97
98 //- Runtime type information
99 TypeName("GAMGProcAgglomeration");
100
101
102 // Declare run-time constructor selection tables
103
104 //- Runtime selection table for pure geometric agglomerators
106 (
107 autoPtr,
110 (
111 GAMGAgglomeration& agglom,
113 ),
114 (
115 agglom,
117 )
118 );
119
120
121 // Constructors
122
123 //- Construct given agglomerator and controls
125 (
126 GAMGAgglomeration& agglom,
128 );
129
130
131 // Selectors
132
133 //- Return the selected agglomerator
135 (
136 const word& type,
137 GAMGAgglomeration& agglom,
139 );
140
141
142 //- Destructor
143 virtual ~GAMGProcAgglomeration();
144
145
146 // Member Functions
147
148 //- Modify agglomeration. Return true if modified
149 virtual bool agglomerate() = 0;
150
151};
152
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156} // End namespace Foam
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160#endif
161
162// ************************************************************************* //
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
GAMGAgglomeration & agglom_
Reference to agglomeration.
static autoPtr< GAMGProcAgglomeration > New(const word &type, GAMGAgglomeration &agglom, const dictionary &controlDict)
Return the selected agglomerator.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
declareRunTimeSelectionTable(autoPtr, GAMGProcAgglomeration, GAMGAgglomeration,(GAMGAgglomeration &agglom, const dictionary &controlDict),(agglom, controlDict))
Runtime selection table for pure geometric agglomerators.
TypeName("GAMGProcAgglomeration")
Runtime type information.
virtual ~GAMGProcAgglomeration()
Destructor.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:63
A class for handling words, derived from Foam::string.
Definition: word.H:68
runTime controlDict().readEntry("adjustTimeStep"
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73