PBiCG.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-2016 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::PBiCG
29 
30 Description
31  Preconditioned bi-conjugate gradient solver for asymmetric lduMatrices
32  using a run-time selectable preconditioner.
33 
34 SourceFiles
35  PBiCG.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef PBiCG_H
40 #define PBiCG_H
41 
42 #include "lduMatrix.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class PBiCG Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class PBiCG
54 :
55  public lduMatrix::solver
56 {
57  // Private Member Functions
58 
59  //- No copy construct
60  PBiCG(const PBiCG&) = delete;
61 
62  //- No copy assignment
63  void operator=(const PBiCG&) = delete;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("PBiCG");
70 
71 
72  // Constructors
73 
74  //- Construct from matrix components and solver data stream
75  PBiCG
76  (
77  const word& fieldName,
78  const lduMatrix& matrix,
82  const dictionary& solverControls
83  );
84 
85 
86  //- Destructor
87  virtual ~PBiCG() = default;
88 
89 
90  // Member Functions
91 
92  //- Solve the matrix with this solver
93  virtual solverPerformance solve
94  (
96  const scalarField& source,
97  const direction cmpt=0
98  ) const;
99 };
100 
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 } // End namespace Foam
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 #endif
109 
110 // ************************************************************************* //
Foam::PBiCG::TypeName
TypeName("PBiCG")
Runtime type information.
Foam::lduMatrix::solver::interfaces
const lduInterfaceFieldPtrsList & interfaces() const
Definition: lduMatrix.H:246
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:83
Foam::lduMatrix::solver::matrix
const lduMatrix & matrix() const
Definition: lduMatrix.H:231
Foam::lduMatrix::solver
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:97
lduMatrix.H
Foam::Field< scalar >
Foam::UPtrList< const lduInterfaceField >
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::PBiCG
Preconditioned bi-conjugate gradient solver for asymmetric lduMatrices using a run-time selectable pr...
Definition: PBiCG.H:52
Foam::lduMatrix::solver::interfaceBouCoeffs
const FieldField< Field, scalar > & interfaceBouCoeffs() const
Definition: lduMatrix.H:236
Foam::direction
uint8_t direction
Definition: direction.H:47
Foam::lduMatrix::solver::fieldName
const word & fieldName() const
Definition: lduMatrix.H:226
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
Foam::PBiCG::solve
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
Definition: PBiCG.C:70
Foam::lduMatrix::solver::interfaceIntCoeffs
const FieldField< Field, scalar > & interfaceIntCoeffs() const
Definition: lduMatrix.H:241
Foam::SolverPerformance
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition: SolverPerformance.H:51
Foam::PBiCG::~PBiCG
virtual ~PBiCG()=default
Destructor.