PPCR.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) 2019-2020 Mattijs Janssens
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::PPCR
28 
29 Description
30  Preconditioned pipelined conjugate residuals solver for symmetric
31  lduMatrices using a run-time selectable preconditioner.
32 
33  Reference:
34  \verbatim
35  P. Ghysels, W. Vanroose.
36  "Hiding global synchronization latency in the
37  preconditioned Conjugate Gradient algorithm"
38  \endverbatim
39  and implementation details from
40  \verbatim
41  Paul Eller, William Gropp
42  "Scalable Non-blocking Preconditioned Conjugate Gradient Methods"
43  \endverbatim
44 
45 See also
46  PPCG
47 
48 SourceFiles
49  PPCR.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef PPCR_H
54 #define PPCR_H
55 
56 #include "PPCG.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class PPCR Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class PPCR
68 :
69  public PPCG
70 {
71  // Private Member Functions
72 
73  //- No copy construct
74  PPCR(const PPCR&) = delete;
75 
76  //- No copy assignment
77  void operator=(const PPCR&) = delete;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("PPCR");
84 
85 
86  // Constructors
87 
88  //- Construct from matrix components and solver controls
89  PPCR
90  (
91  const word& fieldName,
92  const lduMatrix& matrix,
96  const dictionary& solverControls
97  );
98 
99 
100  //- Destructor
101  virtual ~PPCR() = default;
102 
103 
104  // Member Functions
105 
106  //- Solve the matrix with this solver
107  virtual solverPerformance solve
108  (
109  scalarField& psi,
110  const scalarField& source,
111  const direction cmpt=0
112  ) const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::lduMatrix::solver::interfaces
const lduInterfaceFieldPtrsList & interfaces() const
Definition: lduMatrix.H:246
Foam::PPCR::~PPCR
virtual ~PPCR()=default
Destructor.
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::PPCR
Preconditioned pipelined conjugate residuals solver for symmetric lduMatrices using a run-time select...
Definition: PPCR.H:66
Foam::PPCR::TypeName
TypeName("PPCR")
Runtime type information.
Foam::Field< scalar >
Foam::UPtrList< const lduInterfaceField >
Foam::PPCR::solve
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
Definition: PPCR.C:69
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
PPCG.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::lduMatrix::solver::interfaceBouCoeffs
const FieldField< Field, scalar > & interfaceBouCoeffs() const
Definition: lduMatrix.H:236
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::lduMatrix::solver::fieldName
const word & fieldName() const
Definition: lduMatrix.H:226
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
Foam::PPCG
Preconditioned pipelined conjugate gradient solver for symmetric lduMatrices using a run-time selecta...
Definition: PPCG.H:64
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