Bug fixes for compile case where Adorbate is not included.
This commit is contained in:
parent
28c55aa639
commit
daa7cbfe95
3 changed files with 14 additions and 4 deletions
|
|
@ -15,7 +15,9 @@
|
||||||
#include "ShomatePoly.h"
|
#include "ShomatePoly.h"
|
||||||
#include "ConstCpPoly.h"
|
#include "ConstCpPoly.h"
|
||||||
#include "Mu0Poly.h"
|
#include "Mu0Poly.h"
|
||||||
|
#ifdef WITH_ADSORBATE
|
||||||
#include "AdsorbateThermo.h"
|
#include "AdsorbateThermo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SpeciesThermoFactory.h"
|
#include "SpeciesThermoFactory.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
@ -122,7 +124,7 @@ namespace Cantera {
|
||||||
//AssertThrow(m_sp[index] == 0,
|
//AssertThrow(m_sp[index] == 0,
|
||||||
// "Index position isn't null, duplication of assignment: " + int2str(index));
|
// "Index position isn't null, duplication of assignment: " + int2str(index));
|
||||||
|
|
||||||
int nfreq = 3;
|
//int nfreq = 3;
|
||||||
/*
|
/*
|
||||||
* Create the necessary object
|
* Create the necessary object
|
||||||
*/
|
*/
|
||||||
|
|
@ -153,10 +155,12 @@ namespace Cantera {
|
||||||
m_sp[index] = new NasaPoly2(index, minTemp, maxTemp,
|
m_sp[index] = new NasaPoly2(index, minTemp, maxTemp,
|
||||||
refPressure, c);
|
refPressure, c);
|
||||||
break;
|
break;
|
||||||
|
#ifdef WITH_ADSORBATE
|
||||||
case ADSORBATE:
|
case ADSORBATE:
|
||||||
m_sp[index] = new Adsorbate(index, minTemp, maxTemp,
|
m_sp[index] = new Adsorbate(index, minTemp, maxTemp,
|
||||||
refPressure, c);
|
refPressure, c);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
throw UnknownSpeciesThermoModel(
|
throw UnknownSpeciesThermoModel(
|
||||||
"GeneralSpeciesThermo::install",
|
"GeneralSpeciesThermo::install",
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@ using namespace std;
|
||||||
#include "Nasa9PolyMultiTempRegion.h"
|
#include "Nasa9PolyMultiTempRegion.h"
|
||||||
#include "Nasa9Poly1.h"
|
#include "Nasa9Poly1.h"
|
||||||
|
|
||||||
|
#ifdef WITH_ADSORBATE
|
||||||
#include "AdsorbateThermo.h"
|
#include "AdsorbateThermo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SpeciesThermoMgr.h"
|
#include "SpeciesThermoMgr.h"
|
||||||
#include "speciesThermoTypes.h"
|
#include "speciesThermoTypes.h"
|
||||||
|
|
@ -495,6 +497,7 @@ namespace Cantera {
|
||||||
* This is called by method installThermoForSpecies if a NASA9
|
* This is called by method installThermoForSpecies if a NASA9
|
||||||
* block is found in the XML input.
|
* block is found in the XML input.
|
||||||
*/
|
*/
|
||||||
|
#ifdef WITH_ADSORBATE
|
||||||
static void installAdsorbateThermoFromXML(std::string speciesName,
|
static void installAdsorbateThermoFromXML(std::string speciesName,
|
||||||
SpeciesThermo& sp, int k,
|
SpeciesThermo& sp, int k,
|
||||||
const XML_Node& f) {
|
const XML_Node& f) {
|
||||||
|
|
@ -521,6 +524,7 @@ namespace Cantera {
|
||||||
// DATA_PTR(coeffs));
|
// DATA_PTR(coeffs));
|
||||||
(&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref);
|
(&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Install a species thermodynamic property parameterization
|
* Install a species thermodynamic property parameterization
|
||||||
|
|
@ -562,9 +566,11 @@ namespace Cantera {
|
||||||
else if (f->name() == "NASA9") {
|
else if (f->name() == "NASA9") {
|
||||||
installNasa9ThermoFromXML(s["name"], spthermo, k, tp);
|
installNasa9ThermoFromXML(s["name"], spthermo, k, tp);
|
||||||
}
|
}
|
||||||
|
#ifdef WITH_ADSORBATE
|
||||||
else if (f->name() == "adsorbate") {
|
else if (f->name() == "adsorbate") {
|
||||||
installAdsorbateThermoFromXML(s["name"], spthermo, k, *f);
|
installAdsorbateThermoFromXML(s["name"], spthermo, k, *f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else {
|
else {
|
||||||
throw UnknownSpeciesThermoModel("installThermoForSpecies",
|
throw UnknownSpeciesThermoModel("installThermoForSpecies",
|
||||||
s["name"], f->name());
|
s["name"], f->name());
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#include "WaterPropsIAPWS.h"
|
#include "WaterPropsIAPWS.h"
|
||||||
//#include "importCTML.h"
|
//#include "importCTML.h"
|
||||||
#include "ThermoFactory.h"
|
#include "ThermoFactory.h"
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
|
|
||||||
namespace Cantera {
|
namespace Cantera {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue