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 Incomplete Cholesky preconditioning with no fill-in.
32 Hrvoje Jasak, Wikki Ltd. All rights reserved.
35 coupledCholeskyPrecon.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef coupledCholeskyPrecon_H
40 #define coupledCholeskyPrecon_H
42 #include "coupledLduPrecon.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class coupledCholeskyPrecon Declaration
51 \*---------------------------------------------------------------------------*/
53 class coupledCholeskyPrecon
55 public coupledLduPrecon
59 //- Preconditioned diagonal
60 FieldField<Field, scalar> preconDiag_;
63 // Private Member Functions
65 //- Disallow default bitwise copy construct
66 coupledCholeskyPrecon(const coupledCholeskyPrecon&);
68 //- Disallow default bitwise assignment
69 void operator=(const coupledCholeskyPrecon&);
71 //- Precondition the diagonal
72 void calcPreconDiag();
77 //- Runtime type information
83 //- Construct from components
86 const coupledLduMatrix& matrix,
87 const PtrList<FieldField<Field, scalar> >& bouCoeffs,
88 const PtrList<FieldField<Field, scalar> >& intCoeffs,
89 const lduInterfaceFieldPtrsListList& interfaces
92 //- Construct from dictionary
95 const coupledLduMatrix& matrix,
96 const PtrList<FieldField<Field, scalar> >& bouCoeffs,
97 const PtrList<FieldField<Field, scalar> >& intCoeffs,
98 const lduInterfaceFieldPtrsListList& interfaces,
99 const dictionary& dict
105 virtual ~coupledCholeskyPrecon()
111 //- Execute preconditioning
112 virtual void precondition
114 FieldField<Field, scalar>& x,
115 const FieldField<Field, scalar>& b,
116 const direction cmpt = 0
119 //- Execute preconditioning for the transpose matrix
120 virtual void preconditionT
122 FieldField<Field, scalar>& x,
123 const FieldField<Field, scalar>& b,
124 const direction cmpt = 0
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace Foam
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 // ************************************************************************* //