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 | Copyright (C) 2012 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::regionModelFunctionObject
26 
27 Description
28  Region model function object base class
29 
30 SourceFiles
31  regionModelFunctionObject.C
32  regionModelFunctionObjectNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef regionModelFunctionObject_H
37 #define regionModelFunctionObject_H
38 
39 #include "IOdictionary.H"
40 #include "autoPtr.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 namespace regionModels
49 {
50 
51 class regionModel;
52 
53 /*---------------------------------------------------------------------------*\
54  Class regionModelFunctionObject Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59 protected:
60 
61  // Protected data
62 
63  //- Dictionary
65 
66  //- Reference to the region model
68 
69  //- Model type name
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("regionModelFunctionObject");
77 
78  //- Declare runtime constructor selection table
80  (
81  autoPtr,
83  dictionary,
84  (
85  const dictionary& dict,
86  regionModel& owner
87  ),
88  (dict, owner)
89  );
90 
91 
92  // Constructors
93 
94  //- Construct null from owner
96 
97  //- Construct from dictionary
99  (
100  const dictionary& dict,
101  regionModel& owner,
102  const word& modelType
103  );
104 
105  //- Construct copy
107 
108  //- Construct and return a clone
110  {
112  (
113  new regionModelFunctionObject(*this)
114  );
115  }
116 
117 
118  //- Destructor
119  virtual ~regionModelFunctionObject();
120 
121 
122  //- Selector
124  (
125  const dictionary& dict,
126  regionModel& owner,
127  const word& modelType
128  );
129 
130 
131  // Member Functions
132 
133  // Evaluation
134 
135  //- Pre-evolve region hook
136  virtual void preEvolveRegion();
137 
138  //- Post-evolve region hook
139  virtual void postEvolveRegion();
140 
141  // I-O
142 
143  //- write
144  virtual void write() const;
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace regionModels
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
declareRunTimeSelectionTable(autoPtr, regionModelFunctionObject, dictionary,(const dictionary &dict, regionModel &owner),(dict, owner))
Declare runtime constructor selection table.
A class for handling words, derived from string.
Definition: word.H:59
regionModel & owner_
Reference to the region model.
TypeName("regionModelFunctionObject")
Runtime type information.
static autoPtr< regionModelFunctionObject > New(const dictionary &dict, regionModel &owner, const word &modelType)
Selector.
regionModelFunctionObject(regionModel &owner)
Construct null from owner.
virtual autoPtr< regionModelFunctionObject > clone() const
Construct and return a clone.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
virtual void postEvolveRegion()
Post-evolve region hook.
virtual void preEvolveRegion()
Pre-evolve region hook.
Namespace for OpenFOAM.