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-2023 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  // Protected Member Functions
66 
67  //- Read controls
68  virtual bool read();
69 
70 
71 public:
72 
73  // Static Data Members
74 
75  //- Run-time type information
76  TypeName("singleRegionConvergenceControl");
77 
78 
79  // Constructors
80 
81  //- Construct from a solution control
83  (
84  const singleRegionSolutionControl& control
85  );
86 
87 
88  //- Destructor
90 
91 
92  // Member Functions
93 
94  // IO
95 
96  //- Print the residual controls
97  void printResidualControls() const;
98 
99 
100  // Evolution
101 
102  //- Return true if residual controls are present
103  virtual bool hasResidualControls() const;
104 
105  //- Return true if all convergence checks are satisfied
106  virtual convergenceData criteriaSatisfied() const;
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
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:99
Single-region-specific derivation of the convergence control class.
singleRegionConvergenceControl(const singleRegionSolutionControl &control)
Construct from a solution control.
const fvMesh & mesh_
Reference to the mesh.
void printResidualControls() const
Print the residual controls.
virtual convergenceData criteriaSatisfied() const
Return true if all convergence checks are satisfied.
virtual bool hasResidualControls() const
Return true if residual controls are present.
List< residualData > residualControl_
List of residual data per field.
TypeName("singleRegionConvergenceControl")
Run-time type information.
Single-region-specific derivation of the solution control class.
Namespace for OpenFOAM.