diff --git a/SConstruct b/SConstruct index 7ab499393..c1d678e90 100644 --- a/SConstruct +++ b/SConstruct @@ -324,10 +324,6 @@ opts.AddVariables( 'sphinx_docs', """Build HTML documentation for the Python module using Sphinx""", False), - BoolVariable( - 'with_adsorbate', - """Include thermodynamic model for adsorbates in the Cantera kernel""", - True), BoolVariable( 'with_h298modify_capability', """Enable changing the 298K heats of formation directly via diff --git a/doc/sphinx/scons-options.txt b/doc/sphinx/scons-options.txt index 05b9d822a..8e2054669 100644 --- a/doc/sphinx/scons-options.txt +++ b/doc/sphinx/scons-options.txt @@ -137,10 +137,6 @@ of this file is: kernel. - default: 'yes' -* with_adsorbate: [ yes | no ] - Include thermodynamic model for adsorbates in the Cantera kernel - - default: 'yes' - * with_h298modify_capability: [ yes | no ] Enable changing the 298K heats of formation directly via the C++ layer. diff --git a/include/cantera/thermo/AdsorbateThermo.h b/include/cantera/thermo/AdsorbateThermo.h index 98b706400..7c02dcf8f 100644 --- a/include/cantera/thermo/AdsorbateThermo.h +++ b/include/cantera/thermo/AdsorbateThermo.h @@ -120,7 +120,7 @@ public: } //! Returns an integer representing the species index - virtual int speciesIndex() const { + virtual size_t speciesIndex() const { return m_index; } @@ -165,7 +165,7 @@ public: * @param coeffs Vector of coefficients used to set the * parameters for the standard state. */ - void reportParameters(int& n, int& type, + void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { @@ -176,7 +176,7 @@ public: pref = m_Pref; coeffs[0] = m_nFreqs; coeffs[1] = m_be; - for (int i = 2; i < m_nFreqs+2; i++) { + for (size_t i = 2; i < m_nFreqs+2; i++) { coeffs[i] = m_freq[i-2]; } } diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 634d9cab3..2964c00cc 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -12,10 +12,7 @@ #include "ShomatePoly.h" #include "ConstCpPoly.h" #include "cantera/thermo/Mu0Poly.h" -#ifdef WITH_ADSORBATE #include "cantera/thermo/AdsorbateThermo.h" -#endif - #include "cantera/thermo/SpeciesThermoFactory.h" #include @@ -157,12 +154,10 @@ void GeneralSpeciesThermo::install(std::string name, 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); break; -#endif default: throw UnknownSpeciesThermoModel( "GeneralSpeciesThermo::install", diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index a90b277d6..ddf5d31b8 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -18,10 +18,7 @@ using namespace std; #include "Nasa9PolyMultiTempRegion.h" #include "cantera/thermo/Nasa9Poly1.h" -#ifdef WITH_ADSORBATE #include "cantera/thermo/AdsorbateThermo.h" -#endif - #include "cantera/thermo/SpeciesThermoMgr.h" #include "cantera/thermo/speciesThermoTypes.h" #include "cantera/thermo/VPSSMgr.h" @@ -677,7 +674,6 @@ static void installNasa9ThermoFromXML(std::string speciesName, } -#ifdef WITH_ADSORBATE //! Install a Adsorbate polynomial thermodynamic property parameterization for species k into a SpeciesThermo instance. /*! * This is called by method installThermoForSpecies if a Adsorbate block is found in the XML input. @@ -719,7 +715,6 @@ static void installAdsorbateThermoFromXML(std::string speciesName, copy(freqs.begin(), freqs.end(), coeffs.begin() + 2); (&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref); } -#endif //================================================================================================ // Install a species thermodynamic property parameterization @@ -782,11 +777,9 @@ void SpeciesThermoFactory::installThermoForSpecies } else if (f->name() == "NASA9") { installNasa9ThermoFromXML(speciesNode["name"], spthermo, k, tp); } -#ifdef WITH_ADSORBATE else if (f->name() == "adsorbate") { installAdsorbateThermoFromXML(speciesNode["name"], spthermo, k, *f); } -#endif else { throw UnknownSpeciesThermoModel("installThermoForSpecies", speciesNode["name"], f->name());