BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / cfdTools / general / solutionControl / pimpleControl / pimpleControl.H
blob54831aa97d9bcee309dd2295019ae8fa5579bc28
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::pimpleControl
27 Description
28     PIMPLE control class to supply convergence information/checks for
29     the PIMPLE loop.
31 \*---------------------------------------------------------------------------*/
33 #ifndef pimpleControl_H
34 #define pimpleControl_H
36 #include "solutionControl.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace Foam
43 /*---------------------------------------------------------------------------*\
44                         Class pimpleControl Declaration
45 \*---------------------------------------------------------------------------*/
47 class pimpleControl
49     public solutionControl
51 protected:
53     // Protected data
55         // Solution controls
57             //- Maximum number of PIMPLE correctors
58             label nOuterCorr_;
60             //- Maximum number of PISO correctors
61             label nCorr_;
63             //- Current PIMPLE corrector
64             label corr_;
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
73         virtual void read();
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&);
85 public:
88     // Static Data Members
90         //- Run-time type information
91         TypeName("pimpleControl");
94     // Constructors
96         //- Construct from mesh
97         pimpleControl(fvMesh& mesh);
100     //- Destructor
101     virtual ~pimpleControl();
104     // Member Functions
106         // Access
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;
118         // Solution control
120             //- Loop start
121             inline bool start();
123             //- Loop loop
124             inline bool loop();
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
131             (
132                 const label corr,
133                 const label nonOrth
134             ) const;
136             //- Helper function to identify whether to solve for turbulence
137             inline bool turbCorr() const;
140     // Member Operators
142         void operator++(int);
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #include "pimpleControlI.H"
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #endif
158 // ************************************************************************* //