simpleControl.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-2016 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
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::simpleControl
29
30Description
31 SIMPLE control class to supply convergence information/checks for
32 the SIMPLE loop.
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef simpleControl_H
37#define simpleControl_H
38
39#include "solutionControl.H"
40
41//- Declare that pimpleControl will be used
42#define SIMPLE_CONTROL
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class simpleControl Declaration
51\*---------------------------------------------------------------------------*/
53class simpleControl
54:
55 public solutionControl
56{
57
58protected:
59
60 // Protected Data
61
62 //- Initialised flag
63 bool initialised_;
64
65
66 // Protected Member Functions
67
68 //- Read controls from fvSolution dictionary
69 bool read();
70
71 //- Return true if all convergence checks are satisfied
72 bool criteriaSatisfied();
73
74
75private:
76
77 // Private member functions
78
79 //- No copy construct
80 simpleControl(const simpleControl&) = delete;
81
82 //- No copy assignment
83 void operator=(const simpleControl&) = delete;
84
85
86public:
87
88 // Static Data Members
89
90 //- Run-time type information
91 TypeName("simpleControl");
92
93
94 // Constructors
95
96 //- Construct from mesh and the name of control sub-dictionary
98 (
99 fvMesh& mesh,
100 const word& dictName = "SIMPLE",
101 const bool verbose = true
102 );
103
104
105 //- Destructor
106 virtual ~simpleControl() = default;
107
108
109 // Member Functions
110
111 // Solution control
112
113 //- SIMPLE loop
114 virtual bool loop();
115};
116
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120} // End namespace Foam
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124#endif
125
126// ************************************************************************* //
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
Definition: simpleControl.H:55
TypeName("simpleControl")
Run-time type information.
bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
Definition: simpleControl.C:49
bool initialised_
Initialised flag.
Definition: simpleControl.H:62
virtual ~simpleControl()=default
Destructor.
virtual bool loop()
SIMPLE loop.
bool read()
Read controls from fvSolution dictionary.
Definition: simpleControl.C:42
Base class for solution control classes.
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
const word dictName("faMeshDefinition")
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73