PBiCGStab.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) 2016-2021 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 stabilised 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 
70 public:
71 
72  //- Runtime type information
73  TypeName("PBiCGStab");
74 
75 
76  // Constructors
77 
78  //- Construct from matrix components and solver data stream
79  PBiCGStab
80  (
81  const word& fieldName,
82  const lduMatrix& matrix,
86  const dictionary& solverControls
87  );
88 
89  //- Disallow default bitwise copy construction
90  PBiCGStab(const PBiCGStab&) = delete;
91 
92 
93  //- Destructor
94  virtual ~PBiCGStab()
95  {}
96 
97 
98  // Member Functions
99 
100  //- Solve the matrix with this solver
101  virtual solverPerformance solve
102  (
103  scalarField& psi,
104  const scalarField& source,
105  const direction cmpt=0
106  ) const;
107 
108 
109  // Member Operators
110 
111  //- Disallow default bitwise assignment
112  void operator=(const PBiCGStab&) = delete;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
PBiCGStab(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from matrix components and solver data stream.
Definition: PBiCGStab.C:45
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
uint8_t direction
Definition: direction.H:45
void operator=(const PBiCGStab &)=delete
Disallow default bitwise assignment.
TypeName("PBiCGStab")
Runtime type information.
const lduMatrix & matrix() const
Definition: lduMatrix.H:226
const FieldField< Field, scalar > & interfaceBouCoeffs() const
Definition: lduMatrix.H:231
Generic field type.
Definition: FieldField.H:51
const FieldField< Field, scalar > & interfaceIntCoeffs() const
Definition: lduMatrix.H:236
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:93
const lduInterfaceFieldPtrsList & interfaces() const
Definition: lduMatrix.H:241
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
Definition: PBiCGStab.C:69
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Definition: lduMatrix.H:79
fvModels source(alpha1, mixture.thermo1().rho())
const word & fieldName() const
Definition: lduMatrix.H:221
const volScalarField & psi
Preconditioned bi-conjugate gradient stabilised solver for asymmetric lduMatrices using a run-time se...
Definition: PBiCGStab.H:64
Namespace for OpenFOAM.