pairGAMGAgglomeration.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) 2011-2013 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::pairGAMGAgglomeration
28 
29 Description
30  Agglomerate using the pair algorithm.
31 
32 SourceFiles
33  pairGAMGAgglomeration.C
34  pairGAMGAgglomerate.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef pairGAMGAgglomeration_H
39 #define pairGAMGAgglomeration_H
40 
41 #include "GAMGAgglomeration.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class pairGAMGAgglomeration Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public GAMGAgglomeration
55 {
56  // Private data
57 
58  //- Number of levels to merge, 1 = don't merge, 2 = merge pairs etc.
59  label mergeLevels_;
60 
61  //- Direction of cell loop for the current level
62  static bool forward_;
63 
64 
65 protected:
66 
67  // Protected Member Functions
68 
69  //- Agglomerate all levels starting from the given face weights
70  void agglomerate
71  (
72  const lduMesh& mesh,
73  const scalarField& faceWeights
74  );
75 
76  //- No copy construct
78 
79  //- No copy assignment
80  void operator=(const pairGAMGAgglomeration&) = delete;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("pair");
87 
88 
89  // Constructors
90 
91  //- Construct given mesh and controls
93  (
94  const lduMesh& mesh,
95  const dictionary& controlDict
96  );
97 
98  //- Calculate and return agglomeration
100  (
101  label& nCoarseCells,
102  const lduAddressing& fineMatrixAddressing,
103  const scalarField& faceWeights
104  );
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::GAMGAgglomeration
Geometric agglomerated algebraic multigrid agglomeration class.
Definition: GAMGAgglomeration.H:64
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::pairGAMGAgglomeration::agglomerate
void agglomerate(const lduMesh &mesh, const scalarField &faceWeights)
Agglomerate all levels starting from the given face weights.
Definition: pairGAMGAgglomerate.C:34
GAMGAgglomeration.H
Foam::Field< scalar >
Foam::MeshObject< lduMesh, GeometricMeshObject, GAMGAgglomeration >::mesh
const lduMesh & mesh() const
Definition: MeshObject.H:122
Foam::pairGAMGAgglomeration::pairGAMGAgglomeration
pairGAMGAgglomeration(const pairGAMGAgglomeration &)=delete
No copy construct.
controlDict
runTime controlDict().readEntry("adjustTimeStep"
Definition: debug.C:143
Foam::pairGAMGAgglomeration::TypeName
TypeName("pair")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::pairGAMGAgglomeration::operator=
void operator=(const pairGAMGAgglomeration &)=delete
No copy assignment.
Foam::pairGAMGAgglomeration
Agglomerate using the pair algorithm.
Definition: pairGAMGAgglomeration.H:51
Foam::lduMesh
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:62