singleRegionConvergenceControl.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::singleRegionConvergenceControl
26 
27 Description
28  Single-region-specific derivation of the convergence control class
29 
30 SourceFiles
31  singleRegionConvergenceControl.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleRegionConvergenceControl_H
36 #define singleRegionConvergenceControl_H
37 
38 #include "convergenceControl.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class singleRegionConvergenceControl Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public convergenceControl
53 {
54 protected:
55 
56  // Protected data
57 
58  //- Reference to the mesh
59  const fvMesh& mesh_;
60 
61  //- List of residual data per field
63 
64 
65 public:
66 
67  // Static Data Members
68 
69  //- Run-time type information
70  TypeName("singleRegionConvergenceControl");
71 
72 
73  // Constructors
74 
75  //- Construct from a solution control
77  (
78  const singleRegionSolutionControl& control
79  );
80 
81 
82  //- Destructor
84 
85 
86  // Member Functions
87 
88  // IO
89 
90  //- Read residual controls
91  bool readResidualControls();
92 
93  //- Print the residual controls
94  void printResidualControls() const;
95 
96 
97  // Evolution
98 
99  //- Return true if residual controls are present
100  virtual bool hasResidualControls() const;
101 
102  //- Return true if all convergence checks are satisfied
103  virtual bool criteriaSatisfied() const;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
Convergence control class. Provides methods to check the convergence of the time loop against an abso...
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Single-region-specific derivation of the convergence control class.
singleRegionConvergenceControl(const singleRegionSolutionControl &control)
Construct from a solution control.
virtual bool criteriaSatisfied() const
Return true if all convergence checks are satisfied.
const fvMesh & mesh_
Reference to the mesh.
void printResidualControls() const
Print the residual controls.
virtual bool hasResidualControls() const
Return true if residual controls are present.
List< residualData > residualControl_
List of residual data per field.
bool readResidualControls()
Read residual controls.
TypeName("singleRegionConvergenceControl")
Run-time type information.
Single-region-specific derivation of the solution control class.
Namespace for OpenFOAM.