1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Preconditioned Conjugate Gradient solver for coupled matrices with
30 run-time selectable preconditioning.
33 Hrvoje Jasak, Wikki Ltd. All rights reserved.
38 \*---------------------------------------------------------------------------*/
40 #ifndef coupledCgSolver_H
41 #define coupledCgSolver_H
43 #include "coupledIterativeSolver.H"
44 #include "coupledLduPrecon.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class coupledCgSolver Declaration
53 \*---------------------------------------------------------------------------*/
57 public coupledIterativeSolver
62 autoPtr<coupledLduPrecon> preconPtr_;
65 // Private Member Functions
67 //- Disallow default bitwise copy construct
68 coupledCgSolver(const coupledCgSolver&);
70 //- Disallow default bitwise assignment
71 void operator=(const coupledCgSolver&);
76 //- Runtime type information
82 //- Construct from matrix
85 const word& fieldName,
86 const coupledLduMatrix& matrix,
87 const PtrList<FieldField<Field, scalar> >& bouCoeffs,
88 const PtrList<FieldField<Field, scalar> >& intCoeffs,
89 const lduInterfaceFieldPtrsListList& interfaces,
90 const dictionary& solverData
96 virtual ~coupledCgSolver()
102 //- Solve the matrix with this solver
103 virtual coupledSolverPerformance solve
105 FieldField<Field, scalar>& x,
106 const FieldField<Field, scalar>& b,
107 const direction cmpt = 0
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 // ************************************************************************* //