From 6011f24b384e8c8c5a5fa572e05220d96f45f00b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 31 May 2012 14:57:32 +0000 Subject: [PATCH] Removed unnecessary WITH_FEATURE configuration options --- SConstruct | 57 ---------------------- configure.ac | 26 ++++------ doc/doxygen/Doxyfile | 2 - doc/sphinx/scons-options.txt | 38 --------------- include/cantera/base/config.h.in | 24 --------- include/cantera/electrolyteThermo.h | 3 -- include/cantera/equilibrium.h | 2 - include/cantera/thermo.h | 21 -------- include/cantera/thermo/LatticePhase.h | 3 -- include/cantera/thermo/LatticeSolidPhase.h | 8 --- include/cantera/thermo/PureFluidPhase.h | 14 ------ include/cantera/thermo/RedlichKwongMFTP.h | 3 -- samples/f77/demo_ftnlib.cpp | 16 ------ src/clib/ct.cpp | 47 ------------------ src/clib/ctmultiphase.cpp | 7 --- src/converters/Reaction.h | 5 -- src/equil/MultiPhaseEquil.cpp | 4 -- src/equil/equilibrate.cpp | 5 -- src/equil/vcs_MultiPhaseEquil.cpp | 6 --- src/equil/vcs_equilibrate.cpp | 4 -- src/matlab/thermomethods.cpp | 2 - src/thermo/LatticePhase.cpp | 4 -- src/thermo/LatticeSolidPhase.cpp | 4 -- src/thermo/PureFluidPhase.cpp | 4 -- src/thermo/RedlichKwongMFTP.cpp | 5 -- src/thermo/ThermoFactory.cpp | 46 ----------------- src/transport/TransportFactory.cpp | 10 ---- 27 files changed, 9 insertions(+), 361 deletions(-) diff --git a/SConstruct b/SConstruct index 21c660148..58d154c90 100644 --- a/SConstruct +++ b/SConstruct @@ -324,24 +324,6 @@ opts.AddVariables( 'sphinx_docs', """Build HTML documentation for the Python module using Sphinx""", False), - BoolVariable( - 'with_lattice_solid', - """Include thermodynamic model for lattice solids in the - Cantera kernel.""", - True), - BoolVariable( - 'with_metal', - """Include thermodynamic model for metals in the Cantera kernel.""", - True), - BoolVariable( - 'with_stoich_substance', - """Include thermodynamic model for stoichiometric substances - in the Cantera kernel.""", - True), - BoolVariable( - 'with_semiconductor', - """Include thermodynamic model for semiconductors in the Cantera kernel.""", - True), BoolVariable( 'with_adsorbate', """Include thermodynamic model for adsorbates in the Cantera kernel""", @@ -350,31 +332,6 @@ opts.AddVariables( 'with_spectra', """Include spectroscopy capability in the Cantera kernel.""", True), - BoolVariable( - 'with_pure_fluids', - """Include accurate liquid/vapor equations of state for - several fluids, including water, nitrogen, hydrogen, - oxygen, methane, and HFC-134a.""", - True), - BoolVariable( - 'with_real_gases', - """Enable the Redlich-Kwong MFTP real gas model.""", - True), - BoolVariable( - 'with_ideal_solutions', - """Include capabilities for working with ideal solutions.""", - True), - BoolVariable( - 'with_electrolytes', - """Enable expanded electrochemistry capabilities, including - thermodynamic models for electrolyte solutions.""", - True), - BoolVariable( - 'with_prime', - """Enable generating phase models from PrIMe models. For more - information about PrIME, see http://www.primekinetics.org - WARNING: Support for PrIMe is experimental!""", - False), BoolVariable( 'with_h298modify_capability', """Enable changing the 298K heats of formation directly via @@ -401,10 +358,6 @@ opts.AddVariables( 'with_reaction_paths', """Enable reaction path analysis""", True), - BoolVariable( - 'with_vcsnonideal', - """Enable vcs equilibrium package for nonideal phases""", - True), BoolVariable( 'enable_transport', 'Enable transport property calculations.', @@ -969,18 +922,8 @@ if env['use_sundials'] == 'y': else: configh['SUNDIALS_VERSION'] = 0 -cdefine('WITH_ELECTROLYTES', 'with_electrolytes') -cdefine('WITH_IDEAL_SOLUTIONS', 'with_ideal_solutions') -cdefine('WITH_LATTICE_SOLID', 'with_lattice_solid') -cdefine('WITH_METAL', 'with_metal') -cdefine('WITH_STOICH_SUBSTANCE', 'with_stoich_substance') -cdefine('WITH_SEMICONDUCTOR', 'with_semiconductor') -cdefine('WITH_PRIME', 'with_prime') cdefine('H298MODIFY_CAPABILITY', 'with_h298modify_capability') -cdefine('WITH_PURE_FLUIDS', 'with_pure_fluids') cdefine('WITH_HTML_LOGS', 'with_html_log_files') -cdefine('WITH_VCSNONIDEAL', 'with_vcsnonideal') -cdefine('WITH_REAL_GASES', 'with_real_gases') cdefine('LAPACK_FTN_STRING_LEN_AT_END', 'lapack_ftn_string_len_at_end') cdefine('LAPACK_FTN_TRAILING_UNDERSCORE', 'lapack_ftn_trailing_underscore') diff --git a/configure.ac b/configure.ac index be379278a..f076dd9bd 100644 --- a/configure.ac +++ b/configure.ac @@ -46,14 +46,6 @@ typedef int ftnlen; // Fortran hidden string length type #define STRING_LEN_AT_END #define STORE_MOLE_FRACTIONS -#define INCL_PURE_FLUIDS 1 -#define WITH_PURE_FLUIDS 1 - -#define WITH_LATTICE_SOLID 1 -#define WITH_METAL 1 -#define WITH_STOICH_SUBSTANCE 1 -#define WITH_IDEAL_SOLUTIONS 1 -#define WITH_ELECTROLYTES 1 #define HAS_SSTREAM 1 #define CANTERA_DATA "/usr/local/cantera/data" @@ -73,8 +65,8 @@ AC_PROG_LIBTOOL AM_SANITY_CHECK # ---------------- -# Doxygen support -# ---------------- +# Doxygen support +# ---------------- DX_HTML_FEATURE(ON) DX_CHM_FEATURE(OFF) @@ -85,7 +77,7 @@ DX_RTF_FEATURE(OFF) DX_XML_FEATURE(OFF) DX_PDF_FEATURE(ON) DX_PS_FEATURE(OFF) -DX_INIT_DOXYGEN(cantera, doxygen/cantera.dox, docs) +DX_INIT_DOXYGEN(cantera, doxygen/cantera.dox, docs) # Generate Output Files AC_OUTPUT(Makefile \ @@ -151,15 +143,15 @@ AC_OUTPUT(Makefile \ src/transport/Makefile \ src/spectra/Makefile src/zeroD/Makefile \ src/equil/Makefile \ - cantera.pc) + cantera.pc) # skipped tests -# test_problems/ck2cti/Makefile -# test_problems/nasa9_reader/Makefile -# test_problems/rankine_democxx/Makefile -# test_problems/VCSnonideal/NaCl_equil/Makefile +# test_problems/ck2cti/Makefile +# test_problems/nasa9_reader/Makefile +# test_problems/rankine_democxx/Makefile +# test_problems/VCSnonideal/NaCl_equil/Makefile # FINAL SUMMARY -AX_SUMMARIZE_CONFIG +AX_SUMMARIZE_CONFIG diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index d6002fddc..ef9ea4f25 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -1329,9 +1329,7 @@ INCLUDE_FILE_PATTERNS = # instead of the = operator. PREDEFINED = WITH_HTML_LOGS \ - WITH_PURE_FLUIDS \ THREAD_SAFE_CANTERA \ - WITH_LATTICE_SOLID \ HAVE_CONFIG_H \ DEPRECATED(x)=x diff --git a/doc/sphinx/scons-options.txt b/doc/sphinx/scons-options.txt index 5709fed1d..22aec66ba 100644 --- a/doc/sphinx/scons-options.txt +++ b/doc/sphinx/scons-options.txt @@ -137,20 +137,6 @@ of this file is: kernel. - default: 'yes' -* with_metal: [ yes | no ] - Include thermodynamic model for metals in the Cantera kernel. - - default: 'yes' - -* with_stoich_substance: [ yes | no ] - Include thermodynamic model for stoichiometric substances in the - Cantera kernel. - - default: 'yes' - -* with_semiconductor: [ yes | no ] - Include thermodynamic model for semiconductors in the Cantera - kernel. - - default: 'yes' - * with_adsorbate: [ yes | no ] Include thermodynamic model for adsorbates in the Cantera kernel - default: 'yes' @@ -159,26 +145,6 @@ of this file is: Include spectroscopy capability in the Cantera kernel. - default: 'yes' -* with_pure_fluids: [ yes | no ] - Include accurate liquid/vapor equations of state for several fluids, - including water, nitrogen, hydrogen, oxygen, methane, and HFC-134a. - - default: 'yes' - -* with_ideal_solutions: [ yes | no ] - Include capabilities for working with ideal solutions. - - default: 'yes' - -* with_electrolytes: [ yes | no ] - Enable expanded electrochemistry capabilities, including - thermodynamic models for electrolyte solutions. - - default: 'yes' - -* with_prime: [ yes | no ] - Enable generating phase models from PrIMe models. For more - information about PrIME, see http://www.primekinetics.org WARNING: - Support for PrIMe is experimental! - - default: 'no' - * with_h298modify_capability: [ yes | no ] Enable changing the 298K heats of formation directly via the C++ layer. @@ -203,10 +169,6 @@ of this file is: Enable reaction path analysis - default: 'yes' -* with_vcsnonideal: [ yes | no ] - Enable vcs equilibrium package for nonideal phases - - default: 'yes' - * enable_transport: [ yes | no ] Enable transport property calculations. - default: 'yes' diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index f5167dce5..e5dbd04f5 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -117,30 +117,6 @@ typedef int ftnlen; // Fortran hidden string length type //--------------------- compile options ---------------------------- %(THREAD_SAFE_CANTERA)s -//--------------------- optional phase models ---------------------- -// This define indicates the enabling of the inclusion of -// accurate liquid/vapor equations -// of state for several fluids, including water, nitrogen, hydrogen, -// oxygen, methane, and HFC-134a. -%(WITH_PURE_FLUIDS)s - -%(WITH_LATTICE_SOLID)s -%(WITH_METAL)s -%(WITH_STOICH_SUBSTANCE)s -// Enable expanded thermodynamic capabilities, adding -// ideal solid solutions -%(WITH_IDEAL_SOLUTIONS)s -%(WITH_REAL_GASES)s -// Enable expanded electrochemistry capabilities, include thermo -// models for electrolyte solutions. -%(WITH_ELECTROLYTES)s - -%(WITH_PRIME)s - -// Enable the VCS NonIdeal equilibrium solver. This is -// accessed by specifying the solver=2 option -%(WITH_VCSNONIDEAL)s - //-------------- Optional Cantera Capabilities ---------------------- // Enable sensitivity analysis via changing H298 directly diff --git a/include/cantera/electrolyteThermo.h b/include/cantera/electrolyteThermo.h index 71e4c9498..534a3e462 100644 --- a/include/cantera/electrolyteThermo.h +++ b/include/cantera/electrolyteThermo.h @@ -9,8 +9,6 @@ #ifndef CT_ELECTROLYTETHERMO_INCL #define CT_ELECTROLYTETHERMO_INCL - -#ifdef WITH_ELECTROLYTES #include "thermo/electrolytes.h" #include "thermo/MolalityVPSSTP.h" #include "thermo/VPStandardStateTP.h" @@ -25,6 +23,5 @@ #include "thermo/WaterSSTP.h" #include "thermo/VPSSMgr_Water_HKFT.h" #include "thermo/VPSSMgr_Water_ConstVol.h" -#endif #endif diff --git a/include/cantera/equilibrium.h b/include/cantera/equilibrium.h index 4608aeb31..cb6862b76 100644 --- a/include/cantera/equilibrium.h +++ b/include/cantera/equilibrium.h @@ -8,9 +8,7 @@ #include "equil/equil.h" #include "equil/ChemEquil.h" #include "equil/MultiPhaseEquil.h" -#ifdef WITH_VCSNONIDEAL #include "equil/vcs_MultiPhaseEquil.h" #endif -#endif diff --git a/include/cantera/thermo.h b/include/cantera/thermo.h index dd0ad596c..9d93f4ef5 100644 --- a/include/cantera/thermo.h +++ b/include/cantera/thermo.h @@ -13,33 +13,12 @@ #include "thermo/SurfPhase.h" #include "thermo/EdgePhase.h" - -#ifdef WITH_IDEAL_SOLUTIONS - #include "thermo/GibbsExcessVPSSTP.h" #include "thermo/MargulesVPSSTP.h" -#endif - -#ifdef WITH_ELECTROLYTES - #include "electrolyteThermo.h" -#endif - - -#ifdef WITH_LATTICE_SOLID - #include "thermo/LatticePhase.h" #include "thermo/LatticeSolidPhase.h" -#endif - -#ifdef WITH_PURE_FLUIDS - - -#endif - - - #endif diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index cc217f0b5..f47011432 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -12,8 +12,6 @@ #include "cantera/base/config.h" -#ifdef WITH_LATTICE_SOLID - #include "cantera/base/ct_defs.h" #include "mix_defs.h" #include "ThermoPhase.h" @@ -1034,4 +1032,3 @@ private: } #endif -#endif diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index f130c291a..a9caed11c 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -12,19 +12,13 @@ #define CT_LATTICESOLID_H #include "cantera/base/config.h" - -#ifdef WITH_LATTICE_SOLID - #include "cantera/base/ct_defs.h" - #include "mix_defs.h" #include "ThermoPhase.h" #include "SpeciesThermo.h" #include "LatticePhase.h" #include "cantera/base/utilities.h" - - namespace Cantera { @@ -724,6 +718,4 @@ private: }; } -#endif // #ifdef WITH_LATTICE_SOLID - #endif diff --git a/include/cantera/thermo/PureFluidPhase.h b/include/cantera/thermo/PureFluidPhase.h index 7b9580115..10655044e 100644 --- a/include/cantera/thermo/PureFluidPhase.h +++ b/include/cantera/thermo/PureFluidPhase.h @@ -5,8 +5,6 @@ * gas, liquid, mixed-gas-liquid and supercrit fluid (see \ref thermoprops * and class \link Cantera::PureFluidPhase PureFluidPhase\endlink). * - * This class is only available if the WITH_PURE_FLUIDS optional compile - * capability has been turned on in Cantera's makefile system. * It inherits from ThermoPhase, but is built on top of the tpx package. */ @@ -16,16 +14,6 @@ #define CT_EOS_TPX_H #include "ThermoPhase.h" -/* - * For doxygen to recognize the ifdef below, it seems necessary to - * include a specific include reference. - */ -/** - * This object is only available if the WITH_PURE_FLUIDS optional compile - * capability has been turned on in Cantera's makefile system. - */ -#ifdef WITH_PURE_FLUIDS - #include "mix_defs.h" namespace tpx @@ -603,5 +591,3 @@ private: } #endif -#endif - diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index f70a68aa5..edad833da 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -28,8 +28,6 @@ class PDSS; */ //@{ -#ifdef WITH_REAL_GASES - /** * @ingroup thermoprops * @@ -835,7 +833,6 @@ public: }; -#endif } #endif diff --git a/samples/f77/demo_ftnlib.cpp b/samples/f77/demo_ftnlib.cpp index fe348edd7..acd0f725c 100644 --- a/samples/f77/demo_ftnlib.cpp +++ b/samples/f77/demo_ftnlib.cpp @@ -40,16 +40,7 @@ IdealGasMix* _gasptr() return _gas; } -// comment these out to produce a smaller executable if not needed -#define WITH_EQUIL -#define WITH_TRANSPORT - -#ifdef WITH_EQUIL #include "cantera/equilibrium.h" -#endif - - -#ifdef WITH_TRANSPORT #include "cantera/transport.h" // store a pointer to a transport manager @@ -58,7 +49,6 @@ Transport* _transptr() { return _trans; } -#endif // error handler void handleError(CanteraError& err) @@ -99,7 +89,6 @@ extern "C" { } catch (CanteraError& err) { handleError(err); } -#ifdef WITH_TRANSPORT try { if (_trans) { delete _trans; @@ -108,7 +97,6 @@ extern "C" { } catch (CanteraError& err) { _trans = newTransportMgr("",_gas,1); } -#endif } /// integer function nElements() @@ -285,7 +273,6 @@ extern "C" { _gas->getMassFractions(y); } -#ifdef WITH_EQUIL void equilibrate_(char* opt, ftnlen lenopt) { try { @@ -299,7 +286,6 @@ extern "C" { handleError(err); } } -#endif //---------------- kinetics ------------------------- @@ -345,7 +331,6 @@ extern "C" { //-------------------- transport properties -------------------- -#ifdef WITH_TRANSPORT double viscosity_() { try { @@ -383,7 +368,6 @@ extern "C" { handleError(err); } } -#endif } diff --git a/src/clib/ct.cpp b/src/clib/ct.cpp index d9d9d35a2..56faf6ad9 100644 --- a/src/clib/ct.cpp +++ b/src/clib/ct.cpp @@ -39,7 +39,6 @@ template<> ThermoCabinet* ThermoCabinet::__storage = 0; template<> KineticsCabinet* KineticsCabinet::__storage = 0; template<> TransportCabinet* TransportCabinet::__storage = 0; -#ifdef WITH_PURE_FLUIDS static PureFluidPhase* purefluid(int n) { PureFluidPhase* p = dynamic_cast(&ThermoCabinet::item(n)); @@ -49,7 +48,6 @@ static PureFluidPhase* purefluid(int n) throw CanteraError("purefluid","object is not a PureFluidPhase object"); } } -#endif /** * Exported functions. @@ -728,7 +726,6 @@ extern "C" { } //-------------- pure fluids ---------------// -#ifdef WITH_PURE_FLUIDS double th_critTemperature(int n) { @@ -803,50 +800,6 @@ extern "C" { return handleAllExceptions(-1, ERR); } } -#else - - double th_critTemperature(int n) - { - return DERR; - } - - double th_critPressure(int n) - { - return DERR; - } - - double th_critDensity(int n) - { - return DERR; - } - - double th_vaporFraction(int n) - { - return DERR; - } - - double th_satTemperature(int n, double p) - { - return DERR; - } - - double th_satPressure(int n, double t) - { - return DERR; - } - - int th_setState_Psat(int n, double p, double x) - { - return DERR; - } - - int th_setState_Tsat(int n, double t, double x) - { - return DERR; - } -#endif - - //-------------- Kinetics ------------------// diff --git a/src/clib/ctmultiphase.cpp b/src/clib/ctmultiphase.cpp index 0c619ce1a..062ed5688 100644 --- a/src/clib/ctmultiphase.cpp +++ b/src/clib/ctmultiphase.cpp @@ -306,15 +306,8 @@ extern "C" { int maxsteps, int maxiter, int loglevel) { try { -#ifdef WITH_VCSNONIDEAL int retn = vcs_equilibrate(mixCabinet::item(i), XY, estimateEquil, printLvl, solver, rtol, maxsteps, maxiter, loglevel); -#else - int retn = -1; - throw CanteraError("mix_vcs_equilibrate", - "The VCS NonIdeal equilibrium solver isn't compiled in\n" - " To use this feature add export WITH_VCS_NONIDEAL='y' to the preconfig file"); -#endif return (double) retn; } catch (...) { return handleAllExceptions(-1, ERR); diff --git a/src/converters/Reaction.h b/src/converters/Reaction.h index 4eccb21be..f75d549cb 100644 --- a/src/converters/Reaction.h +++ b/src/converters/Reaction.h @@ -30,11 +30,6 @@ const int Elementary = 2000; ///< elementary, pressure-independent reaction const int ThreeBody = 2001; ///< three-body reaction const int Falloff = 2002; ///< falloff reaction const int ChemAct = 2003; ///< chemical activation reaction - -#ifdef ENABLE_PLASMA_REACTIONS -const int CrossSection = 2004; ///< momentum transfer cross section -const int CollisionFreq = 2005; ///< momentum transfer collision frequency -#endif //@} /** diff --git a/src/equil/MultiPhaseEquil.cpp b/src/equil/MultiPhaseEquil.cpp index 7e512d713..b361a7e98 100644 --- a/src/equil/MultiPhaseEquil.cpp +++ b/src/equil/MultiPhaseEquil.cpp @@ -3,9 +3,7 @@ */ #include "cantera/equil/MultiPhaseEquil.h" #include "cantera/equil/MultiPhase.h" -#ifdef WITH_ELECTROLYTES #include "cantera/thermo/MolalityVPSSTP.h" -#endif #include "cantera/base/global.h" #include "cantera/base/stringUtils.h" @@ -1034,10 +1032,8 @@ void MultiPhaseEquil::reportCSV(const std::string& reportFile) VolPhaseVolumes *= TMolesPhase; vol += VolPhaseVolumes; if (actConvention == 1) { -#ifdef WITH_ELECTROLYTES MolalityVPSSTP* mTP = static_cast(tp); mTP->getMolalities(DATA_PTR(molalities)); -#endif tp->getChemPotentials(DATA_PTR(mu)); if (iphase == 0) { diff --git a/src/equil/equilibrate.cpp b/src/equil/equilibrate.cpp index 5a636359c..b893d01af 100644 --- a/src/equil/equilibrate.cpp +++ b/src/equil/equilibrate.cpp @@ -122,7 +122,6 @@ int equilibrate(thermo_t& s, const char* XY, int solver, } while (redo) { if (solver >= 2) { -#ifdef WITH_VCSNONIDEAL int printLvlSub = 0; int estimateEquil = 0; try { @@ -154,10 +153,6 @@ int equilibrate(thermo_t& s, const char* XY, int solver, throw err; } } -#else - throw CanteraError("equilibrate", - "VCSNonIdeal solver called, but not compiled"); -#endif } else if (solver == 1) { try { MultiPhase m; diff --git a/src/equil/vcs_MultiPhaseEquil.cpp b/src/equil/vcs_MultiPhaseEquil.cpp index 7c4ce2482..ea91b7076 100644 --- a/src/equil/vcs_MultiPhaseEquil.cpp +++ b/src/equil/vcs_MultiPhaseEquil.cpp @@ -22,12 +22,8 @@ #include "cantera/base/clockWC.h" #include "cantera/thermo/ThermoPhase.h" #include "cantera/thermo/speciesThermoTypes.h" -#ifdef WITH_IDEAL_SOLUTIONS #include "cantera/thermo/IdealSolidSolnPhase.h" -#endif -#ifdef WITH_ELECTROLYTES #include "cantera/thermo/IdealMolalSoln.h" -#endif #include "cantera/equil/ChemEquil.h" #include @@ -835,10 +831,8 @@ void vcs_MultiPhaseEquil::reportCSV(const std::string& reportFile) if (actConvention == 1) { -#ifdef WITH_ELECTROLYTES MolalityVPSSTP* mTP = static_cast(tp); mTP->getMolalities(VCS_DATA_PTR(molalities)); -#endif tp->getChemPotentials(VCS_DATA_PTR(mu)); if (iphase == 0) { diff --git a/src/equil/vcs_equilibrate.cpp b/src/equil/vcs_equilibrate.cpp index 17211f9ca..72f35939e 100644 --- a/src/equil/vcs_equilibrate.cpp +++ b/src/equil/vcs_equilibrate.cpp @@ -20,12 +20,8 @@ #include "cantera/base/ct_defs.h" #include "cantera/thermo/mix_defs.h" #include "cantera/thermo/speciesThermoTypes.h" -#ifdef WITH_IDEAL_SOLUTIONS #include "cantera/thermo/IdealSolidSolnPhase.h" -#endif -#ifdef WITH_ELECTROLYTES #include "cantera/thermo/IdealMolalSoln.h" -#endif #include "cantera/equil/ChemEquil.h" #include diff --git a/src/matlab/thermomethods.cpp b/src/matlab/thermomethods.cpp index 87fd6b380..e2d8a6bc3 100644 --- a/src/matlab/thermomethods.cpp +++ b/src/matlab/thermomethods.cpp @@ -152,7 +152,6 @@ static void thermoget(int nlhs, mxArray* plhs[], case 18: vv = double(th_eosType(n)); break; -#ifdef WITH_PURE_FLUIDS case 19: vv = th_critTemperature(n); break; @@ -173,7 +172,6 @@ static void thermoget(int nlhs, mxArray* plhs[], tsat = getDouble(prhs[3]); vv = th_satPressure(n, tsat); break; -#endif case 25: vv = th_electricPotential(n); break; diff --git a/src/thermo/LatticePhase.cpp b/src/thermo/LatticePhase.cpp index c77f1a200..00cd965d9 100644 --- a/src/thermo/LatticePhase.cpp +++ b/src/thermo/LatticePhase.cpp @@ -8,8 +8,6 @@ * */ #include "cantera/base/config.h" -#ifdef WITH_LATTICE_SOLID - #include "cantera/base/ct_defs.h" #include "cantera/thermo/mix_defs.h" #include "cantera/thermo/LatticePhase.h" @@ -590,5 +588,3 @@ void LatticePhase::setParametersFromXML(const XML_Node& eosdata) //===================================================================================================== } //======================================================================================================= -#endif - diff --git a/src/thermo/LatticeSolidPhase.cpp b/src/thermo/LatticeSolidPhase.cpp index fd58500fc..f951a4be6 100644 --- a/src/thermo/LatticeSolidPhase.cpp +++ b/src/thermo/LatticeSolidPhase.cpp @@ -7,8 +7,6 @@ */ #include "cantera/base/ct_defs.h" -#ifdef WITH_LATTICE_SOLID - #include "cantera/thermo/mix_defs.h" #include "cantera/thermo/LatticeSolidPhase.h" #include "cantera/thermo/LatticePhase.h" @@ -729,5 +727,3 @@ doublereal LatticeSolidPhase::err(std::string msg) const } // End namespace Cantera //====================================================================================================================== -#endif // End #define WITH_LATTICE_SOLID -//====================================================================================================================== diff --git a/src/thermo/PureFluidPhase.cpp b/src/thermo/PureFluidPhase.cpp index 8c48e105d..de755b975 100644 --- a/src/thermo/PureFluidPhase.cpp +++ b/src/thermo/PureFluidPhase.cpp @@ -8,8 +8,6 @@ #include "cantera/base/xml.h" #include "cantera/thermo/PureFluidPhase.h" -#ifdef WITH_PURE_FLUIDS - #include "cantera/tpx/Sub.h" #include "cantera/tpx/utils.h" @@ -813,5 +811,3 @@ void PureFluidPhase::reportCSV(std::ofstream& csvFile) const } } } - -#endif // WITH_PURE_FLUIDS diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 67295dff2..a9ce4c631 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -23,7 +23,6 @@ using namespace std; namespace Cantera { -#ifdef WITH_REAL_GASES const doublereal RedlichKwongMFTP::omega_a = 4.27480233540E-01; const doublereal RedlichKwongMFTP::omega_b = 8.66403499650E-02; @@ -1906,8 +1905,4 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do return nSolnValues; } - -#endif } - - diff --git a/src/thermo/ThermoFactory.cpp b/src/thermo/ThermoFactory.cpp index 75bd7be40..ce3086947 100644 --- a/src/thermo/ThermoFactory.cpp +++ b/src/thermo/ThermoFactory.cpp @@ -14,63 +14,41 @@ #include "cantera/thermo/VPSSMgr.h" #include "VPSSMgrFactory.h" -#ifdef WITH_IDEAL_SOLUTIONS #include "cantera/thermo/IdealSolidSolnPhase.h" #include "cantera/thermo/MargulesVPSSTP.h" #include "cantera/thermo/RedlichKisterVPSSTP.h" #include "cantera/thermo/IonsFromNeutralVPSSTP.h" #include "cantera/thermo/PhaseCombo_Interaction.h" -#endif -#ifdef WITH_PURE_FLUIDS #include "cantera/thermo/PureFluidPhase.h" -#endif - -#ifdef WITH_REAL_GASES #include "cantera/thermo/RedlichKwongMFTP.h" -#endif #include "cantera/thermo/ConstDensityThermo.h" #include "cantera/thermo/SurfPhase.h" #include "cantera/thermo/EdgePhase.h" -#ifdef WITH_METAL #include "cantera/thermo/MetalPhase.h" -#endif - -#ifdef WITH_SEMICONDUCTOR #include "cantera/thermo/SemiconductorPhase.h" -#endif #undef USE_SSTP -#ifdef WITH_STOICH_SUBSTANCE #ifdef USE_SSTP #include "cantera/thermo/StoichSubstanceSSTP.h" #else #include "cantera/thermo/StoichSubstance.h" #endif -#endif -#ifdef WITH_STOICH_SUBSTANCE #include "cantera/thermo/MineralEQ3.h" #include "cantera/thermo/MetalSHEelectrons.h" #include "cantera/thermo/FixedChemPotSSTP.h" -#endif -//#include "importCTML.h" - -#ifdef WITH_LATTICE_SOLID #include "cantera/thermo/LatticeSolidPhase.h" #include "cantera/thermo/LatticePhase.h" -#endif -#ifdef WITH_ELECTROLYTES #include "cantera/thermo/HMWSoln.h" #include "cantera/thermo/DebyeHuckel.h" #include "cantera/thermo/IdealMolalSoln.h" #include "cantera/thermo/MolarityIonicVPSSTP.h" #include "cantera/thermo/MixedSolventElectrolyte.h" -#endif #include "cantera/thermo/IdealSolnGasVPSS.h" @@ -147,7 +125,6 @@ ThermoPhase* ThermoFactory::newThermoPhase(std::string model) th = new EdgePhase; break; -#ifdef WITH_IDEAL_SOLUTIONS case cIdealSolidSolnPhase: th = new IdealSolidSolnPhase(); break; @@ -171,15 +148,11 @@ ThermoPhase* ThermoFactory::newThermoPhase(std::string model) case cIonsFromNeutral: th = new IonsFromNeutralVPSSTP(); break; -#endif -#ifdef WITH_METAL case cMetal: th = new MetalPhase; break; -#endif -#ifdef WITH_STOICH_SUBSTANCE case cStoichSubstance: #ifdef USE_SSTP th = new StoichSubstanceSSTP; @@ -187,27 +160,19 @@ ThermoPhase* ThermoFactory::newThermoPhase(std::string model) th = new StoichSubstance; #endif break; -#endif -#ifdef WITH_STOICH_SUBSTANCE case cFixedChemPot: th = new FixedChemPotSSTP; break; -#endif -#ifdef WITH_STOICH_SUBSTANCE case cMineralEQ3: th = new MineralEQ3(); break; -#endif -#ifdef WITH_STOICH_SUBSTANCE case cMetalSHEelectrons: th = new MetalSHEelectrons(); break; -#endif -#ifdef WITH_LATTICE_SOLID case cLatticeSolid: th = new LatticeSolidPhase; break; @@ -215,21 +180,15 @@ ThermoPhase* ThermoFactory::newThermoPhase(std::string model) case cLattice: th = new LatticePhase; break; -#endif -#ifdef WITH_PURE_FLUIDS case cPureFluid: th = new PureFluidPhase; break; -#endif -#ifdef WITH_REAL_GASES case cRedlichKwongMFTP: th = new RedlichKwongMFTP; break; -#endif -#ifdef WITH_ELECTROLYTES case cHMW: th = new HMWSoln; break; @@ -241,7 +200,6 @@ ThermoPhase* ThermoFactory::newThermoPhase(std::string model) case cIdealMolalSoln: th = new IdealMolalSoln; break; -#endif case cVPSS_IdealGas: th = new IdealSolnGasVPSS; @@ -295,18 +253,14 @@ ThermoPhase* newPhase(XML_Node& xmlphase) if (model == "singing cows") { throw CanteraError(" newPhase", "Cows don't sing"); } -#ifdef WITH_ELECTROLYTES else if (model == "HMW") { HMWSoln* p = dynamic_cast(t); p->constructPhaseXML(xmlphase,""); } -#endif -#ifdef WITH_IDEAL_SOLUTIONS else if (model == "IonsFromNeutralMolecule") { IonsFromNeutralVPSSTP* p = dynamic_cast(t); p->constructPhaseXML(xmlphase,""); } -#endif else { importPhase(xmlphase, t); } diff --git a/src/transport/TransportFactory.cpp b/src/transport/TransportFactory.cpp index 60e312790..e28febbd2 100644 --- a/src/transport/TransportFactory.cpp +++ b/src/transport/TransportFactory.cpp @@ -12,14 +12,8 @@ #include "cantera/transport/SolidTransport.h" #include "cantera/transport/DustyGasTransport.h" #include "cantera/transport/SimpleTransport.h" - -#ifdef WITH_IDEAL_SOLUTIONS #include "cantera/transport/LiquidTransport.h" -#endif -#ifdef WITH_ELECTROLYTES #include "cantera/transport/AqueousTransport.h" -#endif - #include "cantera/transport/TransportFactory.h" #include "cantera/numerics/polyfit.h" @@ -439,20 +433,16 @@ Transport* TransportFactory::newTransport(std::string transportModel, initLiquidTransport(tr, phase, log_level); tr->setThermo(*phase); break; -#ifdef WITH_IDEAL_SOLUTIONS case cLiquidTransport: tr = new LiquidTransport; initLiquidTransport(tr, phase, log_level); tr->setThermo(*phase); break; -#endif -#ifdef WITH_ELECTROLYTES case cAqueousTransport: tr = new AqueousTransport; initLiquidTransport(tr, phase, log_level); tr->setThermo(*phase); break; -#endif default: throw CanteraError("newTransport","unknown transport model: " + transportModel); }