BasicChemistryModel.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) 2011-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::BasicChemistryModel
26 
27 Description
28  Basic chemistry model templated on thermodynamics
29 
30 SourceFiles
31  BasicChemistryModelI.H
32  BasicChemistryModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef BasicChemistryModel_H
37 #define BasicChemistryModel_H
38 
39 #include "basicChemistryModel.H"
40 #include "autoPtr.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of classes
49 class fvMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  class BasicChemistryModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class ReactionThermo>
57 :
58  public basicChemistryModel
59 {
60 protected:
61 
62  // Protected data
63 
64  //- Thermo
65  ReactionThermo& thermo_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("BasicChemistryModel");
72 
73 
74  //- Thermo type
75  typedef ReactionThermo reactionThermo;
76 
77 
78  //- Declare run-time constructor selection tables
80  (
81  autoPtr,
83  thermo,
84  (ReactionThermo& thermo),
85  (thermo)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from thermo
92  BasicChemistryModel(ReactionThermo& thermo);
93 
94 
95  //- Selector
97  (
98  ReactionThermo& thermo
99  );
100 
101 
102  //- Destructor
103  virtual ~BasicChemistryModel();
104 
105 
106  // Member Functions
107 
108  //- Return access to the thermo package
109  inline ReactionThermo& thermo();
110 
111  //- Return const access to the thermo package
112  inline const ReactionThermo& thermo() const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
123  #include "BasicChemistryModel.C"
124 #endif
125 
126 #include "BasicChemistryModelI.H"
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
Basic chemistry model templated on thermodynamics.
ReactionThermo & thermo()
Return access to the thermo package.
virtual ~BasicChemistryModel()
Destructor.
BasicChemistryModel(ReactionThermo &thermo)
Construct from thermo.
ReactionThermo reactionThermo
Thermo type.
static autoPtr< BasicChemistryModel< ReactionThermo > > New(ReactionThermo &thermo)
Selector.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
ReactionThermo & thermo_
Thermo.
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.
declareRunTimeSelectionTable(autoPtr, BasicChemistryModel, thermo,(ReactionThermo &thermo),(thermo))
Declare run-time constructor selection tables.
Base class for chemistry models.
TypeName("BasicChemistryModel")
Runtime type information.