All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-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::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  const 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  (const ReactionThermo& thermo),
85  (thermo)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from thermo
92  BasicChemistryModel(const ReactionThermo& thermo);
93 
94 
95  //- Selector
97  (
98  const ReactionThermo& thermo
99  );
100 
101 
102  //- Destructor
103  virtual ~BasicChemistryModel();
104 
105 
106  // Member Functions
107 
108  //- Return const access to the thermo package
109  inline const ReactionThermo& thermo() const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #ifdef NoRepository
120  #include "BasicChemistryModel.C"
121 #endif
122 
123 #include "BasicChemistryModelI.H"
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
Basic chemistry model templated on thermodynamics.
virtual ~BasicChemistryModel()
Destructor.
static autoPtr< BasicChemistryModel< ReactionThermo > > New(const ReactionThermo &thermo)
Selector.
BasicChemistryModel(const ReactionThermo &thermo)
Construct from thermo.
ReactionThermo reactionThermo
Thermo type.
const ReactionThermo & thermo_
Thermo.
const ReactionThermo & thermo() const
Return const access to the thermo package.
declareRunTimeSelectionTable(autoPtr, BasicChemistryModel, thermo,(const ReactionThermo &thermo),(thermo))
Declare run-time constructor selection tables.
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.
Namespace for OpenFOAM.
Base class for chemistry models.
TypeName("BasicChemistryModel")
Runtime type information.