DILUPreconditioner.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 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::DILUPreconditioner
29
30Group
31 grpLduMatrixPreconditioners
32
33Description
34 Simplified diagonal-based incomplete LU preconditioner for asymmetric
35 matrices. The reciprocal of the preconditioned diagonal is calculated
36 and stored.
37
38SourceFiles
39 DILUPreconditioner.C
40
41\*---------------------------------------------------------------------------*/
42
43#ifndef DILUPreconditioner_H
44#define DILUPreconditioner_H
45
46#include "lduMatrix.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class DILUPreconditioner Declaration
55\*---------------------------------------------------------------------------*/
58:
60{
61 // Private data
62
63 //- The reciprocal preconditioned diagonal
65
66
67public:
68
69 //- Runtime type information
70 TypeName("DILU");
71
72
73 // Constructors
74
75 //- Construct from matrix components and preconditioner solver controls
77 (
78 const lduMatrix::solver&,
79 const dictionary& solverControlsUnused
80 );
81
82
83 //- Destructor
84 virtual ~DILUPreconditioner() = default;
85
86
87 // Member Functions
88
89 //- Calculate the reciprocal of the preconditioned diagonal
90 static void calcReciprocalD(solveScalarField&, const lduMatrix&);
91
92 //- Return wA the preconditioned form of residual rA
93 virtual void precondition
94 (
96 const solveScalarField& rA,
97 const direction cmpt=0
98 ) const;
99
100 //- Return wT the transpose-matrix preconditioned form of residual rT.
101 virtual void preconditionT
102 (
104 const solveScalarField& rT,
105 const direction cmpt=0
106 ) const;
107};
108
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112} // End namespace Foam
113
114// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116#endif
117
118// ************************************************************************* //
Simplified diagonal-based incomplete LU preconditioner for asymmetric matrices. The reciprocal of the...
TypeName("DILU")
Runtime type information.
virtual void preconditionT(solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
Return wT the transpose-matrix preconditioned form of residual rT.
virtual ~DILUPreconditioner()=default
Destructor.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
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
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:84
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