relaxationModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::relaxationModel
28 
29 Description
30  Abstract base class for providing relaxation values to the cell motion
31  controller
32 
33 SourceFiles
34  relaxationModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef relaxationModel_H
39 #define relaxationModel_H
40 
41 #include "point.H"
42 #include "Time.H"
43 #include "dictionary.H"
44 #include "autoPtr.H"
45 #include "runTimeSelectionTables.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class relaxationModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class relaxationModel
57 :
58  public dictionary
59 {
60 
61 protected:
62 
63  // Protected data
64 
65  //- Reference to the conformalVoronoiMesh holding this cvControls object
66  const Time& runTime_;
67 
68  //- Method coeffs dictionary
70 
71 
72  // Protected Member Functions
73 
74  //- No copy construct
75  relaxationModel(const relaxationModel&) = delete;
76 
77  //- No copy assignment
78  void operator=(const relaxationModel&) = delete;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("relaxationModel");
85 
86 
87  // Declare run-time constructor selection table
88 
90  (
91  autoPtr,
93  dictionary,
94  (
95  const dictionary& relaxationDict,
96  const Time& runTime
97  ),
98  (relaxationDict, runTime)
99  );
100 
101 
102  // Constructors
103 
104  //- Construct from components
106  (
107  const word& type,
108  const dictionary& relaxationDict,
109  const Time& runTime
110  );
111 
112 
113  // Selectors
114 
115  //- Return a reference to the selected relaxationModel
117  (
118  const dictionary& relaxationDict,
119  const Time& runTime
120  );
121 
122 
123  //- Destructor
124  virtual ~relaxationModel() = default;
125 
126 
127  // Member Functions
128 
129  //- Const access to the coeffs dictionary
130  const dictionary& coeffDict() const
131  {
132  return coeffDict_;
133  }
134 
135  //- Return the current relaxation coefficient
136  virtual scalar relaxation() = 0;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::relaxationModel::relaxation
virtual scalar relaxation()=0
Return the current relaxation coefficient.
Foam::relaxationModel::New
static autoPtr< relaxationModel > New(const dictionary &relaxationDict, const Time &runTime)
Return a reference to the selected relaxationModel.
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::relaxationModel::runTime_
const Time & runTime_
Reference to the conformalVoronoiMesh holding this cvControls object.
Definition: relaxationModel.H:65
point.H
Foam::relaxationModel::operator=
void operator=(const relaxationModel &)=delete
No copy assignment.
Foam::relaxationModel::coeffDict
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
Definition: relaxationModel.H:129
Foam::relaxationModel::relaxationModel
relaxationModel(const relaxationModel &)=delete
No copy construct.
Foam::relaxationModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, relaxationModel, dictionary,(const dictionary &relaxationDict, const Time &runTime),(relaxationDict, runTime))
Foam::relaxationModel::TypeName
TypeName("relaxationModel")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::relaxationModel::coeffDict_
dictionary coeffDict_
Method coeffs dictionary.
Definition: relaxationModel.H:68
Time.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
dictionary.H
Foam::relaxationModel::~relaxationModel
virtual ~relaxationModel()=default
Destructor.
Foam::relaxationModel
Abstract base class for providing relaxation values to the cell motion controller.
Definition: relaxationModel.H:55
autoPtr.H