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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::simpleControl
29 
30 Description
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 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class simpleControl Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class simpleControl
54 :
55  public solutionControl
56 {
57 
58 protected:
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 
75 private:
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 
86 public:
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::simpleControl
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
Definition: simpleControl.H:52
Foam::solutionControl
Base class for solution control classes.
Definition: solutionControl.H:49
dictName
const word dictName("faMeshDefinition")
Foam::simpleControl::initialised_
bool initialised_
Initialised flag.
Definition: simpleControl.H:62
solutionControl.H
Foam::simpleControl::criteriaSatisfied
bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
Definition: simpleControl.C:49
Foam::simpleControl::~simpleControl
virtual ~simpleControl()=default
Destructor.
Foam::simpleControl::loop
virtual bool loop()
SIMPLE loop.
Definition: simpleControl.C:136
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::simpleControl::read
bool read()
Read controls from fvSolution dictionary.
Definition: simpleControl.C:42
Foam::simpleControl::TypeName
TypeName("simpleControl")
Run-time type information.