PBiCGStab.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 | Copyright (C) 2016 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::PBiCGStab
26 
27 Description
28  Preconditioned bi-conjugate gradient stabilized solver for asymmetric
29  lduMatrices using a run-time selectable preconditioner.
30 
31  References:
32  \verbatim
33  Van der Vorst, H. A. (1992).
34  Bi-CGSTAB: A fast and smoothly converging variant of Bi-CG
35  for the solution of nonsymmetric linear systems.
36  SIAM Journal on scientific and Statistical Computing, 13(2), 631-644.
37 
38  Barrett, R., Berry, M. W., Chan, T. F., Demmel, J., Donato, J.,
39  Dongarra, J., Eijkhout, V., Pozo, R., Romine, C. & Van der Vorst, H.
40  (1994).
41  Templates for the solution of linear systems:
42  building blocks for iterative methods
43  (Vol. 43). Siam.
44  \endverbatim
45 
46 SourceFiles
47  PBiCGStab.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef PBiCGStab_H
52 #define PBiCGStab_H
53 
54 #include "lduMatrix.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class PBiCGStab Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class PBiCGStab
66 :
67  public lduMatrix::solver
68 {
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
72  PBiCGStab(const PBiCGStab&);
73 
74  //- Disallow default bitwise assignment
75  void operator=(const PBiCGStab&);
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("PBiCGStab");
82 
83 
84  // Constructors
85 
86  //- Construct from matrix components and solver data stream
87  PBiCGStab
88  (
89  const word& fieldName,
90  const lduMatrix& matrix,
94  const dictionary& solverControls
95  );
96 
97 
98  //- Destructor
99  virtual ~PBiCGStab()
100  {}
101 
102 
103  // Member Functions
104 
105  //- Solve the matrix with this solver
106  virtual solverPerformance solve
107  (
108  scalarField& psi,
109  const scalarField& source,
110  const direction cmpt=0
111  ) const;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
Definition: PBiCGStab.C:66
uint8_t direction
Definition: direction.H:46
const word & fieldName() const
Definition: lduMatrix.H:218
const FieldField< Field, scalar > & interfaceIntCoeffs() const
Definition: lduMatrix.H:233
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("PBiCGStab")
Runtime type information.
Generic field type.
Definition: FieldField.H:51
const lduInterfaceFieldPtrsList & interfaces() const
Definition: lduMatrix.H:238
A class for handling words, derived from string.
Definition: word.H:59
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics...
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:93
virtual ~PBiCGStab()
Destructor.
Definition: PBiCGStab.H:98
const lduMatrix & matrix() const
Definition: lduMatrix.H:223
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Definition: lduMatrix.H:79
const FieldField< Field, scalar > & interfaceBouCoeffs() const
Definition: lduMatrix.H:228
const volScalarField & psi
Preconditioned bi-conjugate gradient stabilized solver for asymmetric lduMatrices using a run-time se...
Definition: PBiCGStab.H:64
Namespace for OpenFOAM.