makeSolidThermo.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) 2012-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 InClass
25  Foam::solidThermo
26 
27 Description
28  Macros for creating solid thermo packages
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef makeSolidThermo_H
33 #define makeSolidThermo_H
34 
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 #define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
39  \
40  \
41 typedef \
42  Transport \
43  < \
44  species::thermo \
45  < \
46  Thermo \
47  < \
48  EqnOfState \
49  < \
50  Specie \
51  > \
52  >, \
53  Type \
54  > \
55  > Transport##Type##Thermo##EqnOfState##Specie; \
56  \
57 typedef \
58  heThermo \
59  < \
60  BaseThermo, \
61  Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
62  > heThermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
63  \
64 typedef \
65  Cthermo \
66  < \
67  BaseThermo, \
68  Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
69  > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
70  \
71  \
72 defineTemplateTypeNameAndDebugWithName \
73 ( \
74  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
75  ( \
76  #Cthermo"<"#Mixture"<" \
77  + Transport##Type##Thermo##EqnOfState##Specie::typeName() \
78  + ">>" \
79  ).c_str(), \
80  0 \
81 ); \
82  \
83  \
84 addToRunTimeSelectionTable \
85 ( \
86  basicThermo, \
87  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
88  fvMesh \
89 ); \
90  \
91 addToRunTimeSelectionTable \
92 ( \
93  BaseThermo, \
94  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
95  fvMesh \
96 ); \
97  \
98 addToRunTimeSelectionTable \
99 ( \
100  BaseThermo, \
101  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
102  dictionary \
103 );
104 
105 
106 
107 #define makeSolidThermoPhysicsType(BaseThermo,Cthermo,Mixture,SolidPhysicsType)\
108  \
109  \
110  \
111 typedef \
112  heThermo \
113  < \
114  BaseThermo, \
115  Mixture<SolidPhysicsType> \
116  > heThermo##Mixture##SolidPhysicsType; \
117  \
118 typedef \
119  Cthermo \
120  < \
121  BaseThermo, \
122  Mixture<SolidPhysicsType> \
123  > Cthermo##Mixture##SolidPhysicsType; \
124  \
125  \
126 defineTemplateTypeNameAndDebugWithName \
127 ( \
128  Cthermo##Mixture##SolidPhysicsType, \
129  ( \
130  #Cthermo"<"#Mixture"<" \
131  + SolidPhysicsType::typeName() \
132  + ">>" \
133  ).c_str(), \
134  0 \
135 ); \
136  \
137  \
138 addToRunTimeSelectionTable \
139 ( \
140  basicThermo, \
141  Cthermo##Mixture##SolidPhysicsType, \
142  fvMesh \
143 ); \
144  \
145 addToRunTimeSelectionTable \
146 ( \
147  BaseThermo, \
148  Cthermo##Mixture##SolidPhysicsType, \
149  fvMesh \
150 ); \
151  \
152 addToRunTimeSelectionTable \
153 ( \
154  BaseThermo, \
155  Cthermo##Mixture##SolidPhysicsType, \
156  dictionary \
157 );
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.