singleRegionCorrectorConvergenceControl.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 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::singleRegionCorrectorConvergenceControl
26 
27 Description
28  Single-region-specific derivation of the corrector convergence control
29  class
30 
31 SourceFiles
32  singleRegionCorrectorConvergenceControl.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef singleRegionCorrectorConvergenceControl_H
37 #define singleRegionCorrectorConvergenceControl_H
38 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class singleRegionCorrectorConvergenceControl Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55 protected:
56 
57  // Protected data
58 
59  //- Reference to the mesh
60  const fvMesh& mesh_;
61 
62  //- List of residual data per field
64 
65 
66 public:
67 
68  // Static Data Members
69 
70  //- Run-time type information
71  TypeName("singleRegionCorrectorConvergenceControl");
72 
73 
74  // Constructors
75 
76  //- Construct from a solution control and the loop name
78  (
79  const singleRegionSolutionControl& control,
80  const word& loopName
81  );
82 
83 
84  //- Destructor
86 
87 
88  // Member Functions
89 
90  // IO
91 
92  //- Read residual controls
94 
95  //- Print the residual controls
96  void printCorrResidualControls(const label n) const;
97 
98 
99  // Evolution
100 
101  //- Return true if corrector residual controls are present
102  virtual bool hasCorrResidualControls() const;
103 
104  //- Return true if all correction convergence checks are satisfied
105  virtual bool corrCriteriaSatisfied() const;
106 
107  //- Reset the solve index in the correction residual control data
108  virtual void resetCorrSolveIndex();
109 
110  //- Update the solve index in the correction residual control data
111  virtual void updateCorrSolveIndex();
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
virtual void resetCorrSolveIndex()
Reset the solve index in the correction residual control data.
void printCorrResidualControls(const label n) const
Print the residual controls.
Single-region-specific derivation of the solution control class.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Corrector convergence control class. Provides methods to check the convergence of an inner iteration ...
TypeName("singleRegionCorrectorConvergenceControl")
Run-time type information.
virtual void updateCorrSolveIndex()
Update the solve index in the correction residual control data.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool hasCorrResidualControls() const
Return true if corrector residual controls are present.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual bool corrCriteriaSatisfied() const
Return true if all correction convergence checks are satisfied.
label n
List< corrResidualData > corrResidualControl_
List of residual data per field.
Single-region-specific derivation of the corrector convergence control class.
Namespace for OpenFOAM.
singleRegionCorrectorConvergenceControl(const singleRegionSolutionControl &control, const word &loopName)
Construct from a solution control and the loop name.