Loading...
Searching...
No Matches
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{
54/*---------------------------------------------------------------------------*\
55 Class GAMGPreconditioner Declaration
56\*---------------------------------------------------------------------------*/
57
59:
60 public GAMGSolver,
62{
63protected:
64
65 // Protected Data
66
67 //- Number of V-cycles to perform
68 label nVcycles_;
69
70 //- Read the control parameters from the controlDict_
71 virtual void readControls();
72
73public:
74
75 //- Runtime type information
76 TypeName("GAMG");
78
79 // Constructors
80
81 //- Construct from matrix components and preconditioner solver controls
83 (
84 const lduMatrix::solver&,
85 const dictionary& solverControls
86 );
87
88
89 //- Destructor
90 virtual ~GAMGPreconditioner() = default;
91
92
93 // Member Functions
94
95 //- Return wA the preconditioned form of residual rA
96 virtual void precondition
97 (
99 const solveScalarField& rA,
100 const direction cmpt=0
101 ) const;
102};
103
104
105// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107} // End namespace Foam
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111#endif
112
113// ************************************************************************* //
virtual ~GAMGPreconditioner()=default
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.
GAMGPreconditioner(const lduMatrix::solver &, const dictionary &solverControls)
Construct from matrix components and preconditioner solver controls.
label nVcycles_
Number of V-cycles to perform.
friend class GAMGPreconditioner
Definition GAMGSolver.H:405
GAMGSolver(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from lduMatrix and solver controls.
Definition GAMGSolver.C:44
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Abstract base-class for lduMatrix preconditioners.
Definition lduMatrix.H:578
Abstract base-class for lduMatrix solvers.
Definition lduMatrix.H:152
Namespace for OpenFOAM.
Field< solveScalar > solveScalarField
uint8_t direction
Definition direction.H:49
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68