makeSolidThermo.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 InClass
27  Foam::solidThermo
28 
29 Description
30  Macros for creating solid thermo packages
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef makeSolidThermo_H
35 #define makeSolidThermo_H
36 
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
41  \
42  \
43 typedef \
44  Transport \
45  < \
46  species::thermo \
47  < \
48  Thermo \
49  < \
50  EqnOfState \
51  < \
52  Specie \
53  > \
54  >, \
55  Type \
56  > \
57  > Transport##Type##Thermo##EqnOfState##Specie; \
58  \
59 typedef \
60  heThermo \
61  < \
62  BaseThermo, \
63  Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
64  > heThermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
65  \
66 typedef \
67  Cthermo \
68  < \
69  BaseThermo, \
70  Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
71  > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
72  \
73  \
74 defineTemplateTypeNameAndDebugWithName \
75 ( \
76  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
77  ( \
78  #Cthermo"<"#Mixture"<" \
79  + Transport##Type##Thermo##EqnOfState##Specie::typeName() \
80  + ">>" \
81  ).c_str(), \
82  0 \
83 ); \
84  \
85  \
86 addToRunTimeSelectionTable \
87 ( \
88  basicThermo, \
89  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
90  fvMesh \
91 ); \
92  \
93 addToRunTimeSelectionTable \
94 ( \
95  BaseThermo, \
96  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
97  fvMesh \
98 ); \
99  \
100 addToRunTimeSelectionTable \
101 ( \
102  BaseThermo, \
103  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
104  dictionary \
105 ); \
106  \
107 addToRunTimeSelectionTable \
108 ( \
109  basicThermo, \
110  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
111  fvMeshDictPhase \
112 ); \
113  \
114 addToRunTimeSelectionTable \
115 ( \
116  BaseThermo, \
117  Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
118  fvMeshDictPhase \
119 );
120 
121 
122 #define makeSolidThermoPhysicsType(BaseThermo,Cthermo,Mixture,SolidPhysicsType)\
123  \
124  \
125  \
126 typedef \
127  heThermo \
128  < \
129  BaseThermo, \
130  Mixture<SolidPhysicsType> \
131  > heThermo##Mixture##SolidPhysicsType; \
132  \
133 typedef \
134  Cthermo \
135  < \
136  BaseThermo, \
137  Mixture<SolidPhysicsType> \
138  > Cthermo##Mixture##SolidPhysicsType; \
139  \
140  \
141 defineTemplateTypeNameAndDebugWithName \
142 ( \
143  Cthermo##Mixture##SolidPhysicsType, \
144  ( \
145  #Cthermo"<"#Mixture"<" \
146  + SolidPhysicsType::typeName() \
147  + ">>" \
148  ).c_str(), \
149  0 \
150 ); \
151  \
152  \
153 addToRunTimeSelectionTable \
154 ( \
155  basicThermo, \
156  Cthermo##Mixture##SolidPhysicsType, \
157  fvMesh \
158 ); \
159  \
160 addToRunTimeSelectionTable \
161 ( \
162  BaseThermo, \
163  Cthermo##Mixture##SolidPhysicsType, \
164  fvMesh \
165 ); \
166  \
167 addToRunTimeSelectionTable \
168 ( \
169  BaseThermo, \
170  Cthermo##Mixture##SolidPhysicsType, \
171  dictionary \
172 );
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.