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-2026 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  const 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  const fvMesh& mesh,
88  const word& algorithmName
89  );
90 
91 
92  //- Destructor
94 
95 
96  // Member Functions
97 
98  // Access
99 
100  //- Return the mesh
101  inline const fvMesh& mesh() const;
102 
103  //- Return the solution dictionary
104  static const dictionary& dict
105  (
106  const fvMesh& mesh,
107  const word& algorithmName
108  );
109 
110  //- Return the solution dictionary
111  virtual const dictionary& dict() const;
112 
113 
114  // Evolution
115 
116  //- Update the mesh data for the final state
117  void updateFinal(const bool finalIter) const;
118 
119  //- Store previous iteration for fields
120  void storePrevIterFields();
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #ifdef NoRepository
132 #endif
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Single-region-specific derivation of the solution control class.
const fvMesh & mesh_
Reference to the mesh.
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.
singleRegionSolutionControl(const fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
virtual const dictionary & dict() const
Return the solution dictionary.
TypeName("singleRegionSolutionControl")
Run-time type information.
const fvMesh & mesh() const
Return 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:63
Namespace for OpenFOAM.