makeSolidChemistryModel: Separate solid-only and solid-gas instantiation macros

Avoids duplicate typedefs.
Thanks to Bruno Santo for patch
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1694
This commit is contained in:
Henry
2015-05-17 22:04:36 +01:00
parent 438312ea26
commit 850ad0913c
2 changed files with 44 additions and 8 deletions

View File

@ -39,8 +39,17 @@ Description
#include "thermoPhysicsTypes.H" #include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// hConstSolidThermoPhysics
makeSolidChemistryModel makeSolidChemistryModel
(
solidChemistryModel,
pyrolysisChemistryModel,
basicSolidChemistryModel,
hConstSolidThermoPhysics
);
makeSolidGasChemistryModel
( (
solidChemistryModel, solidChemistryModel,
pyrolysisChemistryModel, pyrolysisChemistryModel,
@ -49,7 +58,19 @@ makeSolidChemistryModel
gasHThermoPhysics gasHThermoPhysics
); );
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// hPowerSolidThermoPhysics
makeSolidChemistryModel makeSolidChemistryModel
(
solidChemistryModel,
pyrolysisChemistryModel,
basicSolidChemistryModel,
hPowerSolidThermoPhysics
);
makeSolidGasChemistryModel
( (
solidChemistryModel, solidChemistryModel,
pyrolysisChemistryModel, pyrolysisChemistryModel,
@ -58,7 +79,19 @@ makeSolidChemistryModel
gasHThermoPhysics gasHThermoPhysics
); );
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// hExpKappaConstSolidThermoPhysics
makeSolidChemistryModel makeSolidChemistryModel
(
solidChemistryModel,
pyrolysisChemistryModel,
basicSolidChemistryModel,
hExpKappaConstSolidThermoPhysics
);
makeSolidGasChemistryModel
( (
solidChemistryModel, solidChemistryModel,
pyrolysisChemistryModel, pyrolysisChemistryModel,

View File

@ -34,21 +34,24 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeSolidChemistryModel(sChemistry, SS, Comp, SThermo, GThermo) \ #define makeSolidChemistryModel(sChemistry, SS, Comp, SThermo) \
\
typedef Foam::SS<Foam::Comp, Foam::SThermo, Foam::GThermo> \
SS##Comp##SThermo##GThermo; \
\ \
typedef Foam::sChemistry<Foam::Comp, Foam::SThermo> \ typedef Foam::sChemistry<Foam::Comp, Foam::SThermo> \
sChemistryl##Comp##SThermo; \ sChemistry##Comp##SThermo; \
\ \
defineTemplateTypeNameAndDebugWithName \ defineTemplateTypeNameAndDebugWithName \
( \ ( \
sChemistryl##Comp##SThermo, \ sChemistry##Comp##SThermo, \
(Foam::word(sChemistryl##Comp##SThermo::typeName_()) + "<"#Comp"," \ (Foam::word(sChemistry##Comp##SThermo::typeName_()) + "<"#Comp"," \
+ SThermo::typeName() + ">").c_str(), \ + SThermo::typeName() + ">").c_str(), \
0 \ 0 \
); \ );
#define makeSolidGasChemistryModel(sChemistry, SS, Comp, SThermo, GThermo) \
\
typedef Foam::SS<Foam::Comp, Foam::SThermo, Foam::GThermo> \
SS##Comp##SThermo##GThermo; \
\ \
defineTemplateTypeNameAndDebugWithName \ defineTemplateTypeNameAndDebugWithName \
( \ ( \