1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 PIMPLE control class to supply convergence information/checks for
31 \*---------------------------------------------------------------------------*/
33 #ifndef pimpleControl_H
34 #define pimpleControl_H
36 #include "solutionControl.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 /*---------------------------------------------------------------------------*\
44 Class pimpleControl Declaration
45 \*---------------------------------------------------------------------------*/
49 public solutionControl
57 //- Maximum number of PIMPLE correctors
60 //- Maximum number of PISO correctors
63 //- Current PIMPLE corrector
66 //- Flag to indicate whether to only solve turbulence on final iter
67 bool turbOnFinalIterOnly_;
70 // Protected Member Functions
72 //- Read constrols from fvSolution dictionary
75 //- Return true if all convergence checks are satified
76 virtual bool criteriaSatisfied();
78 //- Disallow default bitwise copy construct
79 pimpleControl(const pimpleControl&);
81 //- Disallow default bitwise assignment
82 void operator=(const pimpleControl&);
88 // Static Data Members
90 //- Run-time type information
91 TypeName("pimpleControl");
96 //- Construct from mesh
97 pimpleControl(fvMesh& mesh);
101 virtual ~pimpleControl();
108 //- Current corrector index
109 inline label corr() const;
111 //- Maximum number of PIMPLE correctors
112 inline label nOuterCorr() const;
114 //- Maximum number of PISO correctors
115 inline label nCorr() const;
126 //- Helper function to identify final PIMPLE (outer) iteration
127 inline bool finalIter() const;
129 //- Helper function to identify final inner iteration
130 inline bool finalInnerIter
136 //- Helper function to identify whether to solve for turbulence
137 inline bool turbCorr() const;
142 void operator++(int);
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #include "pimpleControlI.H"
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 // ************************************************************************* //