Bug fixes for compile case where Adorbate is not included.

This commit is contained in:
Harry Moffat 2007-12-19 17:08:17 +00:00
parent 28c55aa639
commit daa7cbfe95
3 changed files with 14 additions and 4 deletions

View file

@ -15,7 +15,9 @@
#include "ShomatePoly.h"
#include "ConstCpPoly.h"
#include "Mu0Poly.h"
#ifdef WITH_ADSORBATE
#include "AdsorbateThermo.h"
#endif
#include "SpeciesThermoFactory.h"
#include <iostream>
@ -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",

View file

@ -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());

View file

@ -17,7 +17,7 @@
#include "WaterPropsIAPWS.h"
//#include "importCTML.h"
#include "ThermoFactory.h"
#include <math.h>
#include <cmath>
namespace Cantera {
/**