From daa7cbfe95cbd4d417d904946af7478f23c8bcf6 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 19 Dec 2007 17:08:17 +0000 Subject: [PATCH] Bug fixes for compile case where Adorbate is not included. --- Cantera/src/thermo/GeneralSpeciesThermo.cpp | 10 +++++++--- Cantera/src/thermo/SpeciesThermoFactory.cpp | 6 ++++++ Cantera/src/thermo/WaterSSTP.cpp | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cantera/src/thermo/GeneralSpeciesThermo.cpp b/Cantera/src/thermo/GeneralSpeciesThermo.cpp index 005acabd7..bc41dab46 100644 --- a/Cantera/src/thermo/GeneralSpeciesThermo.cpp +++ b/Cantera/src/thermo/GeneralSpeciesThermo.cpp @@ -15,7 +15,9 @@ #include "ShomatePoly.h" #include "ConstCpPoly.h" #include "Mu0Poly.h" +#ifdef WITH_ADSORBATE #include "AdsorbateThermo.h" +#endif #include "SpeciesThermoFactory.h" #include @@ -122,7 +124,7 @@ namespace Cantera { //AssertThrow(m_sp[index] == 0, // "Index position isn't null, duplication of assignment: " + int2str(index)); - int nfreq = 3; + //int nfreq = 3; /* * Create the necessary object */ @@ -153,10 +155,12 @@ namespace Cantera { m_sp[index] = new NasaPoly2(index, minTemp, maxTemp, refPressure, c); break; +#ifdef WITH_ADSORBATE case ADSORBATE: - m_sp[index] = new Adsorbate(index, minTemp, maxTemp, - refPressure, c); + m_sp[index] = new Adsorbate(index, minTemp, maxTemp, + refPressure, c); break; +#endif default: throw UnknownSpeciesThermoModel( "GeneralSpeciesThermo::install", diff --git a/Cantera/src/thermo/SpeciesThermoFactory.cpp b/Cantera/src/thermo/SpeciesThermoFactory.cpp index 3a4bd2d3d..fe3057695 100755 --- a/Cantera/src/thermo/SpeciesThermoFactory.cpp +++ b/Cantera/src/thermo/SpeciesThermoFactory.cpp @@ -26,7 +26,9 @@ using namespace std; #include "Nasa9PolyMultiTempRegion.h" #include "Nasa9Poly1.h" +#ifdef WITH_ADSORBATE #include "AdsorbateThermo.h" +#endif #include "SpeciesThermoMgr.h" #include "speciesThermoTypes.h" @@ -495,6 +497,7 @@ namespace Cantera { * This is called by method installThermoForSpecies if a NASA9 * block is found in the XML input. */ +#ifdef WITH_ADSORBATE static void installAdsorbateThermoFromXML(std::string speciesName, SpeciesThermo& sp, int k, const XML_Node& f) { @@ -521,6 +524,7 @@ namespace Cantera { // DATA_PTR(coeffs)); (&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref); } +#endif /** * Install a species thermodynamic property parameterization @@ -562,9 +566,11 @@ namespace Cantera { else if (f->name() == "NASA9") { installNasa9ThermoFromXML(s["name"], spthermo, k, tp); } +#ifdef WITH_ADSORBATE else if (f->name() == "adsorbate") { installAdsorbateThermoFromXML(s["name"], spthermo, k, *f); } +#endif else { throw UnknownSpeciesThermoModel("installThermoForSpecies", s["name"], f->name()); diff --git a/Cantera/src/thermo/WaterSSTP.cpp b/Cantera/src/thermo/WaterSSTP.cpp index c5a6bfea3..78915d092 100644 --- a/Cantera/src/thermo/WaterSSTP.cpp +++ b/Cantera/src/thermo/WaterSSTP.cpp @@ -17,7 +17,7 @@ #include "WaterPropsIAPWS.h" //#include "importCTML.h" #include "ThermoFactory.h" -#include +#include namespace Cantera { /**