Forward compatibility: flex
[foam-extend-3.2.git] / src / foam / matrices / lduMatrix / smoothers / DIC / DICSmoother.H
blob793f361ec2e5891a723534c544acd64fb4cd17ee
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::DICSmoother
27 Description
28     Simplified diagonal-based incomplete Cholesky smoother for symmetric
29     matrices.
31     To improve efficiency, the residual is evaluated after every nSweeps
32     sweeps.
34 SourceFiles
35     DICSmoother.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef DICSmoother_H
40 #define DICSmoother_H
42 #include "lduMatrix.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                            Class DICSmoother Declaration
51 \*---------------------------------------------------------------------------*/
53 class DICSmoother
55     public lduSmoother
57     // Private data
59         //- The reciprocal preconditioned diagonal
60         scalarField rD_;
63 public:
65     //- Runtime type information
66     TypeName("DIC");
69     // Constructors
71         //- Construct from matrix components
72         DICSmoother
73         (
74             const lduMatrix& matrix,
75             const FieldField<Field, scalar>& coupleBouCoeffs,
76             const FieldField<Field, scalar>& coupleIntCoeffs,
77             const lduInterfaceFieldPtrsList& interfaces
78         );
81     // Member Functions
83         //- Execute smoothing
84         void smooth
85         (
86             scalarField& x,
87             const scalarField& b,
88             const direction cmpt,
89             const label nSweeps
90         ) const;
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 } // End namespace Foam
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 #endif
102 // ************************************************************************* //