GAMGPreconditioner.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-2016 OpenFOAM Foundation
9 Copyright (C) 2019 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::GAMGPreconditioner
29
30Group
31 grpLduMatrixPreconditioners
32
33Description
34 Geometric agglomerated algebraic multigrid preconditioner.
35
36See also
37 GAMGSolver for more details.
38
39SourceFiles
40 GAMGPreconditioner.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef GAMGPreconditioner_H
45#define GAMGPreconditioner_H
46
47#include "GAMGSolver.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54/*---------------------------------------------------------------------------*\
55 Class GAMGPreconditioner Declaration
56\*---------------------------------------------------------------------------*/
59:
60 public GAMGSolver,
62{
63protected:
64 // Protected data
65
66 //- Number of V-cycles to perform
67 label nVcycles_;
68
69 //- Read the control parameters from the controlDict_
70 virtual void readControls();
71
72public:
73
74 //- Runtime type information
75 TypeName("GAMG");
76
77
78 // Constructors
79
80 //- Construct from matrix components and preconditioner solver controls
82 (
83 const lduMatrix::solver&,
84 const dictionary& solverControls
85 );
86
87
88 //- Destructor
89 virtual ~GAMGPreconditioner();
90
91
92 // Member Functions
93
94 //- Return wA the preconditioned form of residual rA
95 virtual void precondition
96 (
98 const solveScalarField& rA,
99 const direction cmpt=0
100 ) const;
101};
102
103
104// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105
106} // End namespace Foam
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110#endif
111
112// ************************************************************************* //
Geometric agglomerated algebraic multigrid preconditioner.
virtual ~GAMGPreconditioner()
Destructor.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
virtual void readControls()
Read the control parameters from the controlDict_.
TypeName("GAMG")
Runtime type information.
label nVcycles_
Number of V-cycles to perform.
Geometric agglomerated algebraic multigrid solver.
Definition: GAMGSolver.H:79
friend class GAMGPreconditioner
Definition: GAMGSolver.H:329
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base-class for lduMatrix preconditioners.
Definition: lduMatrix.H:434
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:99
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73