The open source CFD toolbox
FDICSmoother.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-2012 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
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
27Class
28 Foam::FDICSmoother
29
30Description
31 Simplified diagonal-based incomplete Cholesky smoother for symmetric
32 matrices.
33
34 To improve efficiency, the residual is evaluated after every nSweeps
35 sweeps.
36
37SourceFiles
38 FDICSmoother.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef FDICSmoother_H
43#define FDICSmoother_H
44
45#include "lduMatrix.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class FDICSmoother Declaration
54\*---------------------------------------------------------------------------*/
56class FDICSmoother
57:
59{
60 // Private data
61
62 //- The reciprocal preconditioned diagonal
64 solveScalarField rDuUpper_;
65 solveScalarField rDlUpper_;
66
67
68public:
69
70 //- Runtime type information
71 TypeName("FDIC");
72
73
74 // Constructors
75
76 //- Construct from matrix components
78 (
79 const word& fieldName,
80 const lduMatrix& matrix,
84 );
85
86
87 // Member Functions
88
89 //- Smooth the solution for a given number of sweeps
90 void smooth
91 (
93 const scalarField& source,
94 const direction cmpt,
95 const label nSweeps
96 ) const;
97
98 //- Smooth the solution for a given number of sweeps
99 virtual void scalarSmooth
100 (
102 const solveScalarField& source,
103 const direction cmpt,
104 const label nSweeps
105 ) const;
106};
107
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111} // End namespace Foam
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115#endif
116
117// ************************************************************************* //
Simplified diagonal-based incomplete Cholesky smoother for symmetric matrices.
Definition: FDICSmoother.H:58
void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
Definition: FDICSmoother.C:96
TypeName("FDIC")
Runtime type information.
virtual void scalarSmooth(solveScalarField &psi, const solveScalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
Definition: FDICSmoother.C:150
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:80
Abstract base-class for lduMatrix smoothers.
Definition: lduMatrix.H:288
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
Definition: lduMatrix.H:401
const lduInterfaceFieldPtrsList & interfaces() const noexcept
Definition: lduMatrix.H:406
const lduMatrix & matrix() const noexcept
Definition: lduMatrix.H:391
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
Definition: lduMatrix.H:396
const word & fieldName() const noexcept
Definition: lduMatrix.H:386
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:84
A class for handling words, derived from Foam::string.
Definition: word.H:68
const volScalarField & psi
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73