1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Iterative solver for symmetric and assymetric matrices which uses a
29 run-time selected smoother e.g. GaussSeidel to converge the solution to
30 the required tolerance.
32 To improve efficiency, the residual is evaluated after every nSweeps
38 \*---------------------------------------------------------------------------*/
40 #ifndef smoothSolver_H
41 #define smoothSolver_H
43 #include "lduMatrix.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class smoothSolver Declaration
52 \*---------------------------------------------------------------------------*/
56 public lduMatrix::solver
62 //- Number of sweeps before the evaluation of residual
65 //- Read the control parameters from the controlDict_
66 virtual void readControls();
70 //- Runtime type information
71 TypeName("smoothSolver");
76 //- Construct from matrix components and solver controls
79 const word& fieldName,
80 const lduMatrix& matrix,
81 const FieldField<Field, scalar>& interfaceBouCoeffs,
82 const FieldField<Field, scalar>& interfaceIntCoeffs,
83 const lduInterfaceFieldPtrsList& interfaces,
84 const dictionary& solverControls
89 virtual ~smoothSolver()
94 //- Solve the matrix with this solver
95 virtual lduMatrix::solverPerformance solve
98 const scalarField& source,
99 const direction cmpt=0
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 } // End namespace Foam
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 // ************************************************************************* //