makeSolidReaction.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) 2011-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::makeSolidReaction
26 
27 Description
28  Macros for instantiating reactions for solid
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef makeSolidReactionThermo_H
33 #define makeSolidReactionThermo_H
34 
35 #include "solidReaction.H"
36 #include "IrreversibleReaction.H"
37 #include "Reaction.H"
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 #define makeSolidReaction(ReactionType, Thermo, ReactionRate) \
49  \
50  typedef solidReaction<Thermo> solidReaction##Thermo; \
51  \
52  typedef Reaction<Thermo> Reaction##Thermo; \
53  \
54  typedef ReactionType<solidReaction, Thermo, ReactionRate> \
55  ReactionType##Thermo##ReactionRate; \
56  \
57  defineTemplateRunTimeSelectionTable(Reaction##Thermo, Istream); \
58  defineTemplateRunTimeSelectionTable(Reaction##Thermo, dictionary); \
59  \
60  defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0); \
61  defineTemplateTypeNameAndDebug(Reaction##Thermo, 0); \
62  \
63  template<> \
64  const word ReactionType##Thermo##ReactionRate::typeName \
65  ( \
66  ReactionType::typeName_() \
67  + ReactionRate::type() \
68  + solidReaction##Thermo::typeName_() \
69  ); \
70  \
71  addToRunTimeSelectionTable \
72  ( \
73  Reaction##Thermo, \
74  ReactionType##Thermo##ReactionRate, \
75  Istream \
76  ); \
77  \
78  addToRunTimeSelectionTable \
79  ( \
80  Reaction##Thermo, \
81  ReactionType##Thermo##ReactionRate, \
82  dictionary \
83  );
84 
85 #define makeSolidIRReactions(Thermo, ReactionRate) \
86  \
87  makeSolidReaction(IrreversibleReaction, Thermo, ReactionRate)
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 } // End namespace Foam
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #endif
97 
98 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Namespace for OpenFOAM.