relaxationModel.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) 2012-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::relaxationModel
26 
27 Description
28  Abstract base class for providing relaxation values to the cell motion
29  controller
30 
31 SourceFiles
32  relaxationModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef relaxationModel_H
37 #define relaxationModel_H
38 
39 #include "point.H"
40 #include "Time.H"
41 #include "dictionary.H"
42 #include "autoPtr.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class relaxationModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class relaxationModel
55 :
56  public dictionary
57 {
58 
59 protected:
60 
61  // Protected data
62 
63  //- Reference to the conformalVoronoiMesh holding this cvControls object
64  const Time& runTime_;
65 
66  //- Method coeffs dictionary
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("relaxationModel");
74 
75 
76  // Declare run-time constructor selection table
77 
79  (
80  autoPtr,
82  dictionary,
83  (
84  const dictionary& relaxationDict,
85  const Time& runTime
86  ),
87  (relaxationDict, runTime)
88  );
89 
90 
91  // Constructors
92 
93  //- Construct from components
95  (
96  const word& type,
97  const dictionary& relaxationDict,
98  const Time& runTime
99  );
100 
101  //- Disallow default bitwise copy construction
102  relaxationModel(const relaxationModel&) = delete;
103 
104 
105  // Selectors
106 
107  //- Return a reference to the selected relaxationModel
109  (
110  const dictionary& relaxationDict,
111  const Time& runTime
112  );
113 
114 
115  //- Destructor
116  virtual ~relaxationModel();
117 
118 
119  // Member Functions
120 
121  //- Const access to the coeffs dictionary
122  const dictionary& coeffDict() const
123  {
124  return coeffDict_;
125  }
126 
127  //- Return the current relaxation coefficient
128  virtual scalar relaxation() = 0;
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const relaxationModel&) = delete;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
static autoPtr< relaxationModel > New(const dictionary &relaxationDict, const Time &runTime)
Return a reference to the selected relaxationModel.
engineTime & runTime
declareRunTimeSelectionTable(autoPtr, relaxationModel, dictionary,(const dictionary &relaxationDict, const Time &runTime),(relaxationDict, runTime))
virtual scalar relaxation()=0
Return the current relaxation coefficient.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
void operator=(const relaxationModel &)=delete
Disallow default bitwise assignment.
const Time & runTime_
Reference to the conformalVoronoiMesh holding this cvControls object.
TypeName("relaxationModel")
Runtime type information.
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
A class for handling words, derived from string.
Definition: word.H:59
dictionary coeffDict_
Method coeffs dictionary.
relaxationModel(const word &type, const dictionary &relaxationDict, const Time &runTime)
Construct from components.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
Abstract base class for providing relaxation values to the cell motion controller.
virtual ~relaxationModel()
Destructor.
Namespace for OpenFOAM.