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 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  // Evolution
103 
104  //- Store previous iteration for fields
105  void storePrevIterFields();
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #ifdef NoRepository
117 #endif
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
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:137
Solution control class.
void storePrevIterTypeFields() const
Store previous iteration for fields.
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.
const word & algorithmName() const
Return the name of the algorithm.
Namespace for OpenFOAM.