makeThermo.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-2016 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 InClass
25  Foam::fluidThermo
26 
27 Description
28  Macros for creating basic fluid thermo packages
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef makeThermo_H
33 #define makeThermo_H
34 
35 #include "fluidThermo.H"
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #define makeThermoTypedefs(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
41  \
42 typedef \
43  Transport \
44  < \
45  species::thermo \
46  < \
47  Thermo \
48  < \
49  EqnOfState \
50  < \
51  Specie \
52  > \
53  >, \
54  Type \
55  > \
56  > Transport##Type##Thermo##EqnOfState##Specie; \
57  \
58 typedef \
59  Cthermo \
60  < \
61  BaseThermo, \
62  Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
63  > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
64  \
65 defineTemplateTypeNameAndDebugWithName \
66 ( \
67  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
68  ( \
69  #Cthermo"<"#Mixture"<" \
70  + Transport##Type##Thermo##EqnOfState##Specie::typeName() \
71  + ">>" \
72  ).c_str(), \
73  0 \
74 );
75 
76 
77 #define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
78  \
79 makeThermoTypedefs \
80 ( \
81  BaseThermo, \
82  Cthermo, \
83  Mixture, \
84  Transport, \
85  Type, \
86  Thermo, \
87  EqnOfState, \
88  Specie \
89 ) \
90  \
91 addToRunTimeSelectionTable \
92 ( \
93  basicThermo, \
94  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
95  fvMesh \
96 ); \
97  \
98 addToRunTimeSelectionTable \
99 ( \
100  fluidThermo, \
101  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
102  fvMesh \
103 ); \
104  \
105 addToRunTimeSelectionTable \
106 ( \
107  BaseThermo, \
108  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
109  fvMesh \
110 );
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.