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-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::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  //- Return true if the dependencies have been modified
67  virtual bool dependenciesModified() const;
68 
69  //- Store previous iteration for fields
70  template<class Type>
71  void storePrevIterTypeFields() const;
72 
73 
74 public:
75 
76  // Static Data Members
77 
78  //- Run-time type information
79  TypeName("singleRegionSolutionControl");
80 
81 
82  // Constructors
83 
84  //- Construct from a mesh and the name of the algorithm
86 
87 
88  //- Destructor
90 
91 
92  // Member Functions
93 
94  // Access
95 
96  //- Return the mesh
97  inline const fvMesh& mesh() const;
98 
99  //- Return the mesh
100  inline fvMesh& mesh();
101 
102  //- Return the solution dictionary
103  virtual const dictionary& dict() const;
104 
105 
106  // Evolution
107 
108  //- Update the mesh data for the final state
109  void updateFinal(const bool finalIter) 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 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Single-region-specific derivation of the solution control class.
singleRegionSolutionControl(fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
virtual bool dependenciesModified() const
Return true if the dependencies have been modified.
void storePrevIterFields()
Store previous iteration for fields.
void storePrevIterTypeFields() const
Store previous iteration for fields.
virtual const dictionary & dict() const
Return the solution dictionary.
TypeName("singleRegionSolutionControl")
Run-time type information.
const fvMesh & mesh() const
Return the mesh.
fvMesh & mesh_
Reference to the mesh.
void updateFinal(const bool finalIter) const
Update the mesh data for the final state.
Solution control class.
const word & algorithmName() const
Return the name of the algorithm.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.