1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-6 H. Jasak All rights reserved
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 Virtual base class for a block iterative solvers
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
35 BlockIterativeSolver.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef BlockIterativeSolver_H
40 #define BlockIterativeSolver_H
42 #include "BlockLduSolver.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class BlockIterativeSolver Declaration
51 \*---------------------------------------------------------------------------*/
54 class BlockIterativeSolver
56 public BlockLduSolver<Type>
63 //- Relative tolerance
66 //- Minimum number of iterations
67 // (forced irrespective of convergence)
70 //- Maximum number of iterations
74 // Private Member Functions
76 //- Disallow default bitwise copy construct
77 BlockIterativeSolver(const BlockIterativeSolver&);
79 //- Disallow default bitwise assignment
80 void operator=(const BlockIterativeSolver&);
85 // Protected Member Functions
87 //- Return normalisation factor
94 //- Is the stop criterion reached
95 bool stop(BlockSolverPerformance<Type>& solverPerf) const;
102 //- Construct from matrix components and solver data stream
105 const word& fieldName,
106 const BlockLduMatrix<Type>& matrix,
107 const dictionary& dict
113 virtual ~BlockIterativeSolver()
122 scalar tolerance() const
127 //- Return relative tolerance
128 scalar relTolerance() const
130 return relTolerance_;
133 //- Return minimum number of iterations
134 label minIter() const
139 //- Return maximum number of iterations
140 label maxIter() const
148 //- Solve the matrix with this solver
149 virtual BlockSolverPerformance<Type> solve
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
162 # include "BlockIterativeSolver.C"
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 // ************************************************************************* //