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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::noPreconditioner
29 
30 Group
31  grpLduMatrixPreconditioners
32 
33 Description
34  Null preconditioner for both symmetric and asymmetric matrices.
35 
36 SourceFiles
37  noPreconditioner.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef noPreconditioner_H
42 #define noPreconditioner_H
43 
44 #include "lduMatrix.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class noPreconditioner Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class noPreconditioner
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 
68 public:
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  (
93  solveScalarField& wA,
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  (
101  solveScalarField& wT,
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 // ************************************************************************* //
Foam::lduMatrix::solver
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:98
lduMatrix.H
Foam::Field< solveScalar >
Foam::noPreconditioner
Null preconditioner for both symmetric and asymmetric matrices.
Definition: noPreconditioner.H:54
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::noPreconditioner::precondition
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
Definition: noPreconditioner.C:62
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::noPreconditioner::preconditionT
virtual void preconditionT(solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
Return wT the transpose-matrix preconditioned form of residual rT.
Definition: noPreconditioner.H:99
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::noPreconditioner::TypeName
TypeName("none")
Runtime type information.
Foam::noPreconditioner::~noPreconditioner
virtual ~noPreconditioner()=default
Destructor.
Foam::lduMatrix::preconditioner
Abstract base-class for lduMatrix preconditioners.
Definition: lduMatrix.H:433