noPreconditioner.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::noPreconditioner
29
30Group
31 grpLduMatrixPreconditioners
32
33Description
34 Null preconditioner for both symmetric and asymmetric matrices.
35
36SourceFiles
37 noPreconditioner.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef noPreconditioner_H
42#define noPreconditioner_H
43
44#include "lduMatrix.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class noPreconditioner Declaration
53\*---------------------------------------------------------------------------*/
56:
58{
59 // Private Member Functions
60
61 //- No copy construct
62 noPreconditioner(const noPreconditioner&) = delete;
63
64 //- No copy assignment
65 void operator=(const noPreconditioner&) = delete;
66
67
68public:
69
70 //- Runtime type information
71 TypeName("none");
72
73
74 // Constructors
75
76 //- Construct from matrix components and preconditioner solver controls
78 (
79 const lduMatrix::solver&,
80 const dictionary& solverControlsUnused
81 );
82
83
84 //- Destructor
85 virtual ~noPreconditioner() = default;
86
87
88 // Member Functions
89
90 //- Return wA the preconditioned form of residual rA
91 virtual void precondition
92 (
94 const solveScalarField& rA,
95 const direction cmpt=0
96 ) const;
97
98 //- Return wT the transpose-matrix preconditioned form of residual rT.
99 virtual void preconditionT
100 (
102 const solveScalarField& rT,
103 const direction cmpt=0
104 ) const
105 {
106 return precondition(wT, rT, cmpt);
107 }
108};
109
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113} // End namespace Foam
114
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117#endif
118
119// ************************************************************************* //
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
Null preconditioner for both symmetric and asymmetric matrices.
TypeName("none")
Runtime type information.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
virtual void preconditionT(solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
Return wT the transpose-matrix preconditioned form of residual rT.
virtual ~noPreconditioner()=default
Destructor.
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