regionModelFunctionObject.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-2017 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::regionModels::regionModelFunctionObject
28 
29 Description
30  Region model function object base class
31 
32 SourceFiles
33  regionModelFunctionObject.C
34  regionModelFunctionObjectNew.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef regionModelFunctionObject_H
39 #define regionModelFunctionObject_H
40 
41 #include "IOdictionary.H"
42 #include "autoPtr.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 namespace regionModels
51 {
52 
53 class regionModel;
54 
55 /*---------------------------------------------------------------------------*\
56  Class regionModelFunctionObject Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Dictionary
67 
68  //- Reference to the region model
70 
71  //- Model type name
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("regionModelFunctionObject");
79 
80  //- Declare runtime constructor selection table
82  (
83  autoPtr,
85  dictionary,
86  (
87  const dictionary& dict,
88  regionModel& region
89  ),
90  (dict, region)
91  );
92 
93 
94  // Constructors
95 
96  //- Construct null from region
98 
99  //- Construct from dictionary
101  (
102  const dictionary& dict,
103  regionModel& region,
104  const word& modelType
105  );
106 
107  //- Construct copy
109 
110  //- Construct and return a clone
112  {
114  }
115 
116 
117  //- Destructor
118  virtual ~regionModelFunctionObject();
119 
120 
121  //- Selector
123  (
124  const dictionary& dict,
125  regionModel& region,
126  const word& modelType
127  );
128 
129 
130  // Member Functions
131 
132  // Evaluation
133 
134  //- Pre-evolve region hook
135  virtual void preEvolveRegion();
136 
137  //- Post-evolve region hook
138  virtual void postEvolveRegion();
139 
140  // I-O
141 
142  //- write
143  virtual void write() const;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace regionModels
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Foam::autoPtr::New
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::regionModels::regionModelFunctionObject::clone
virtual autoPtr< regionModelFunctionObject > clone() const
Construct and return a clone.
Definition: regionModelFunctionObject.H:110
Foam::regionModels::regionModelFunctionObject::~regionModelFunctionObject
virtual ~regionModelFunctionObject()
Destructor.
Definition: regionModelFunctionObject.C:82
Foam::regionModels::regionModelFunctionObject::dict_
dictionary dict_
Dictionary.
Definition: regionModelFunctionObject.H:65
Foam::regionModels::regionModelFunctionObject::regionModel_
regionModel & regionModel_
Reference to the region model.
Definition: regionModelFunctionObject.H:68
Foam::regionModels::regionModel
Base class for region models.
Definition: regionModel.H:60
Foam::regionModels::regionModelFunctionObject::write
virtual void write() const
write
Definition: regionModelFunctionObject.C:101
Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject
regionModelFunctionObject(regionModel &region)
Construct null from region.
Definition: regionModelFunctionObject.C:46
Foam::regionModels::regionModelFunctionObject
Region model function object base class.
Definition: regionModelFunctionObject.H:58
dict
dictionary dict
Definition: searchingEngine.H:14
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::regionModels::regionModelFunctionObject::TypeName
TypeName("regionModelFunctionObject")
Runtime type information.
IOdictionary.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::regionModels::regionModelFunctionObject::modelType_
word modelType_
Model type name.
Definition: regionModelFunctionObject.H:71
Foam::regionModels::regionModelFunctionObject::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, regionModelFunctionObject, dictionary,(const dictionary &dict, regionModel &region),(dict, region))
Declare runtime constructor selection table.
Foam::regionModels::regionModelFunctionObject::postEvolveRegion
virtual void postEvolveRegion()
Post-evolve region hook.
Definition: regionModelFunctionObject.C:92
Foam::regionModels::regionModelFunctionObject::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region hook.
Definition: regionModelFunctionObject.C:88
Foam::regionModels::regionModelFunctionObject::New
static autoPtr< regionModelFunctionObject > New(const dictionary &dict, regionModel &region, const word &modelType)
Selector.
Definition: regionModelFunctionObjectNew.C:35
autoPtr.H