singleRegionSolutionControl.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-2019 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::singleRegionSolutionControl
26 
27 Description
28  Single-region-specific derivation of the solution control class
29 
30 SourceFiles
31  singleRegionSolutionControlI.H
32  singleRegionSolutionControl.C
33  singleRegionSolutionControlTemplates.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef singleRegionSolutionControl_H
38 #define singleRegionSolutionControl_H
39 
40 #include "fvMesh.H"
41 #include "solutionControl.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class singleRegionSolutionControl Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public solutionControl
55 {
56 protected:
57 
58  // Protected data
59 
60  //- Reference to the mesh
61  fvMesh& mesh_;
62 
63 
64  // Protected Member Functions
65 
66  //- Store previous iteration for fields
67  template<class Type>
68  void storePrevIterTypeFields() const;
69 
70 
71 public:
72 
73  // Static Data Members
74 
75  //- Run-time type information
76  TypeName("singleRegionSolutionControl");
77 
78 
79  // Constructors
80 
81  //- Construct from a mesh and the name of the algorithm
83 
84 
85  //- Destructor
87 
88 
89  // Member Functions
90 
91  // Access
92 
93  //- Return the mesh
94  inline const fvMesh& mesh() const;
95 
96  //- Return the mesh
97  inline fvMesh& mesh();
98 
99  //- Return the solution dictionary
100  virtual const dictionary& dict() const;
101 
102  //- Flag to indicate whether in final state
103  virtual bool isFinal() const;
104 
105 
106  // Evolution
107 
108  //- Update the mesh data for the final state
109  void updateFinal() const;
110 
111  //- Store previous iteration for fields
112  void storePrevIterFields();
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
124 #endif
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
singleRegionSolutionControl(fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
Single-region-specific derivation of the solution control class.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
Solution control class.
void storePrevIterTypeFields() const
Store previous iteration for fields.
virtual bool isFinal() const
Flag to indicate whether in final state.
A class for handling words, derived from string.
Definition: word.H:59
virtual const dictionary & dict() const
Return the solution dictionary.
const fvMesh & mesh() const
Return the mesh.
void storePrevIterFields()
Store previous iteration for fields.
fvMesh & mesh_
Reference to the mesh.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TypeName("singleRegionSolutionControl")
Run-time type information.
void updateFinal() const
Update the mesh data for the final state.
const word & algorithmName() const
Return the name of the algorithm.
Namespace for OpenFOAM.