All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NoPreconditioner.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::NoPreconditioner
26 
27 Description
28  Null preconditioner for both symmetric and asymmetric matrices.
29 
30 SourceFiles
31  NoPreconditioner.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef NoPreconditioner_H
36 #define NoPreconditioner_H
37 
38 #include "LduMatrix.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class NoPreconditioner Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class Type, class DType, class LUType>
50 class NoPreconditioner
51 :
52  public LduMatrix<Type, DType, LUType>::preconditioner
53 {
54 
55 public:
56 
57  //- Runtime type information
58  TypeName("none");
59 
60 
61  // Constructors
62 
63  //- Construct from matrix components and preconditioner data dictionary
65  (
66  const typename LduMatrix<Type, DType, LUType>::solver& sol,
67  const dictionary& preconditionerDict
68  );
69 
70  //- Disallow default bitwise copy construction
71  NoPreconditioner(const NoPreconditioner&) = delete;
72 
73 
74  // Destructor
75 
76  virtual ~NoPreconditioner()
77  {}
78 
79 
80  // Member Functions
81 
82  //- Read and reset the preconditioner parameters from the given
83  // dictionary
84  virtual void read(const dictionary& preconditionerDict);
85 
86  //- Return wA the preconditioned form of residual rA
87  virtual void precondition
88  (
89  Field<Type>& wA,
90  const Field<Type>& rA
91  ) const;
92 
93  //- Return wT the transpose-matrix preconditioned form of
94  // residual rT.
95  virtual void preconditionT
96  (
97  Field<Type>& wT,
98  const Field<Type>& rT
99  ) const
100  {
101  return(precondition(wT, rT));
102  }
103 
104 
105  // Member Operators
106 
107  //- Disallow default bitwise assignment
108  void operator=(const NoPreconditioner&) = delete;
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #ifdef NoRepository
119  #include "NoPreconditioner.C"
120 #endif
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
NoPreconditioner(const typename LduMatrix< Type, DType, LUType >::solver &sol, const dictionary &preconditionerDict)
Construct from matrix components and preconditioner data dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
TypeName("none")
Runtime type information.
void operator=(const NoPreconditioner &)=delete
Disallow default bitwise assignment.
virtual void read(const dictionary &preconditionerDict)
Read and reset the preconditioner parameters from the given.
Pre-declare SubField and related Field type.
Definition: Field.H:56
Abstract base-class for LduMatrix solvers.
Definition: LduMatrix.H:112
Null preconditioner for both symmetric and asymmetric matrices.
virtual void precondition(Field< Type > &wA, const Field< Type > &rA) const
Return wA the preconditioned form of residual rA.
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Definition: LduMatrix.H:69
virtual void preconditionT(Field< Type > &wT, const Field< Type > &rT) const
Return wT the transpose-matrix preconditioned form of.
Namespace for OpenFOAM.