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-2017 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, dictionary); \
58  \
59  defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0); \
60  defineTemplateTypeNameAndDebug(Reaction##Thermo, 0); \
61  \
62  template<> \
63  const word ReactionType##Thermo##ReactionRate::typeName \
64  ( \
65  ReactionType::typeName_() \
66  + ReactionRate::type() \
67  + solidReaction##Thermo::typeName_() \
68  ); \
69  \
70  addToRunTimeSelectionTable \
71  ( \
72  Reaction##Thermo, \
73  ReactionType##Thermo##ReactionRate, \
74  dictionary \
75  );
76 
77 #define makeSolidIRReactions(Thermo, ReactionRate) \
78  \
79  makeSolidReaction(IrreversibleReaction, Thermo, ReactionRate)
80 
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 } // End namespace Foam
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 #endif
89 
90 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Namespace for OpenFOAM.