diff --git a/Cantera/clib/src/ctonedim.cpp b/Cantera/clib/src/ctonedim.cpp index 0adda95fe..c125fed6b 100644 --- a/Cantera/clib/src/ctonedim.cpp +++ b/Cantera/clib/src/ctonedim.cpp @@ -7,10 +7,13 @@ // Cantera includes +#include "config.h" #include "oneD/Sim1D.h" #include "oneD/StFlow.h" #include "oneD/Inlet1D.h" #include "DenseMatrix.h" + +// local includes #include "Cabinet.h" #include "Storage.h" diff --git a/Cantera/src/Constituents.cpp b/Cantera/src/Constituents.cpp index 8a7eafcd1..bb5bd7a54 100755 --- a/Cantera/src/Constituents.cpp +++ b/Cantera/src/Constituents.cpp @@ -23,17 +23,7 @@ using namespace std; namespace Cantera { - //class ElementsFrozen : public CanteraError { - //public: - // ElementsFrozen(string func) - // : CanteraError(func, - // "elements cannot be added after species.") {} - //}; - - /******************************************************************** - * - * Constituents(): - * + /** * Constructor sets all base variable types to zero. Also, it * sets the pointer to the Elements object for this object to the * default value of BaseElements. If the BaseElements Elements @@ -60,44 +50,17 @@ namespace Cantera { Constituents::Constituents(Elements* ptr_Elements) : m_kk(0), m_speciesFrozen(false) , - m_Elements(ptr_Elements) - { - /* - * Check to see that m_Elements is non-null. - */ - if (!m_Elements) { - m_Elements = new Elements(); - } + m_Elements(ptr_Elements) { -// /* -// * Check to see if the default Elements Object has been -// * created. If it hasn't, create it. -// */ -// if (Elements::Global_Elements_List.size() == 0) { -// Elements::Global_Elements_List.push_back(new Elements()); -// } -// /* -// * Assign the default Elements object as the -// * Constituents's Elements object -// */ -// m_Elements = Elements::Global_Elements_List[0]; -// } + if (!m_Elements) m_Elements = new Elements(); - /* - * Register subscription to Elements object whether or not we - * created it here. - */ + // Register subscription to Elements object whether or not we + // created it here. m_Elements->subscribe(); } - /******************************************************************** - * - * ~Constituents(): - * - * Destructor For Constituents class. - * - * When the Elements subscription list hits zero, we delete the - * Elements object from here. + /** + * Destructor. */ Constituents::~Constituents() { @@ -123,21 +86,15 @@ namespace Cantera { int Constituents::nElements() const { return m_Elements->nElements(); } - /******************************************************************** - * - * atomicWeight - * + /** * Return the Atomic weight of element m. - * units = Kg / Kmol + * units = Kg / Kmol */ doublereal Constituents::atomicWeight(int m) const { return m_Elements->atomicWeight(m); } - /******************************************************************* - * - * atomicWeights() - * + /** * returns a reference to the vector of atomic weights pertinent * to this constituents object * units = kg / Kmol @@ -147,44 +104,22 @@ namespace Cantera { } - /******************************************************************** - * - * atomicNumber - * + /** * Return the atomic number of element m. */ int Constituents::atomicNumber(int m) const { return m_Elements->atomicNumber(m); } -#ifdef INCL_DEPRECATED_METHODS - /******************************************************************** - * element(): - * - * Returns an ElementData struct that contains the parameters for - * element m. - * - * -> Passthrough to the Element lvl. - */ - ElementData Constituents::element(int m) const { - return (m_Elements->element(m)); - } -#endif - /******************************************************************* - * - * addElement(): - * + /** * Add an element to the set. * @param symbol symbol string - * Optional: * @param weight atomic weight in kg/mol. * - * * If weight is not given, then a lookup is performed in the * element object * - * -> Passthrough to the Element lvl. */ void Constituents:: addElement(const string& symbol, doublereal weight) @@ -198,16 +133,13 @@ namespace Cantera { m_Elements->addElement(e); } - /******************************************************************* - * - * addUniqueElement(): - * + + /** * Add a unique element to the set. A check on the symbol is made * If the symbol is already an element, then a new element is * not created. * * @param symbol symbol string - * Optional: * @param weight atomic weight in kg/mol. * * If weight is not given, then a lookup is performed in the @@ -231,33 +163,24 @@ namespace Cantera { m_Elements->addElementsFromXML(phase); } - /******************************************************************* - * - * freezeElements() - * + /** * -> Passthrough to the Element lvl. */ void Constituents::freezeElements() { m_Elements->freezeElements(); } - /******************************************************************* - * - * elementsFrozen() - * + /** * -> Passthrough to the Element lvl. */ bool Constituents::elementsFrozen() { return m_Elements->elementsFrozen(); } - /******************************************************************* - * - * elementIndex(): - * - * Index of element named \c name. The index is an integer + /** + * Index of element named \a name. The index is an integer * assigned to each element in the order it was added, - * beginning with 0 for the first element. If \c name is not + * beginning with 0 for the first element. If \a name is not * the name of an element in the set, then the value -1 is * returned. * @@ -481,7 +404,8 @@ namespace Cantera { return m_speciesNames; } - /********************************************************************** + + /** * * ready(): * True if both elements and species have been frozen @@ -490,7 +414,7 @@ namespace Cantera { return (m_Elements->elementsFrozen() && m_speciesFrozen); } - /********************************************************************** + /** * * nAtoms() * @@ -506,7 +430,7 @@ namespace Cantera { return m_speciesComp[m_mm * k + m]; } - /********************************************************************* + /** * * getAtoms() * diff --git a/Cantera/src/ThermoFactory.cpp b/Cantera/src/ThermoFactory.cpp index 25cd54266..677fc4e38 100644 --- a/Cantera/src/ThermoFactory.cpp +++ b/Cantera/src/ThermoFactory.cpp @@ -67,7 +67,7 @@ namespace Cantera { } ThermoPhase* th=0; - map d; + // map d; switch (ieos) { case cIdealGas: diff --git a/Cantera/src/ct_defs.h b/Cantera/src/ct_defs.h index 7ff5313b8..18fa745e5 100755 --- a/Cantera/src/ct_defs.h +++ b/Cantera/src/ct_defs.h @@ -156,10 +156,6 @@ namespace Cantera { typedef ct::ctvector_fp vector_fp; typedef ct::ctvector_int array_int; typedef ct::ctvector_int vector_int; - //typedef std::valarray array_fp; - //typedef std::valarray vector_fp; - //typedef std::valarray array_int; - //typedef std::valarray vector_int; typedef vector_int group_t; typedef std::vector grouplist_t; @@ -167,26 +163,11 @@ namespace Cantera { typedef vector_fp::const_iterator const_workPtr; - template - inline doublereal operator*(const vector& u, const vector& v) { - return inner_product(u.begin(), u.end(), v.begin(), 0.0); - } + // template + //inline doublereal operator*(const vector& u, const vector& v) { + // return inner_product(u.begin(), u.end(), v.begin(), 0.0); + // } - // inline ostream& operator<<(ostream& s, const vector_fp& v) { - // return ct::operator<<(s, v); - //} - -// template -// inline ostream& operator<<(ostream& s, const vector& v) { -// int n = v.size(); -// s << "<"; -// for (int i = 0; i < n; i++) { -// s << v[i]; -// if (i < n-1) s << ", "; -// } -// s << ">"; -// return s; -// } } // namespace diff --git a/Cantera/src/ctvector.cpp b/Cantera/src/ctvector.cpp index 6738eec70..3b29b7e3b 100755 --- a/Cantera/src/ctvector.cpp +++ b/Cantera/src/ctvector.cpp @@ -6,8 +6,8 @@ * Simple vector classes. Classes ctvector_fp and ctvector_int are * designed to be wrappers around double* and int* arrays, * respectively. They provide a few convenient methods that function - * like those of std::vector, but unlike the STL classes explicitly - * allow accessing a pointer to the underlying data array. + * like those of std::vector, but unlike the STL classes, they + * explicitly allow accessing a pointer to the underlying data array. */ #include @@ -15,7 +15,6 @@ #include using namespace std; #include "ctvector.h" -//using namespace ct; namespace ct { diff --git a/Cantera/src/recipes.h b/Cantera/src/recipes.h deleted file mode 100755 index 55ddff414..000000000 --- a/Cantera/src/recipes.h +++ /dev/null @@ -1,21 +0,0 @@ -// declarations for Fortran simplex routines from Numerical Recipes. - -#ifndef NUM_RECIPES_H -#define NUM_RECIPES_H - -extern "C" { - -integer simplx_(doublereal *a, integer *m, integer *n, integer * - mp, integer *np, integer *m1, integer *m2, integer *m3, integer * - icase, integer *izrov, integer *iposv); - -integer splin2_(doublereal *x1a, doublereal *x2a, doublereal *ya, - doublereal *y2a, integer *m, integer *n, - doublereal *x1, doublereal *x2, doublereal *y); - -integer splie2_(doublereal *x1a, doublereal *x2a, doublereal *ya, - integer *m, integer *n, doublereal *y2a); -} - - -#endif diff --git a/configure b/configure index 1fe971981..79c20ea92 100755 --- a/configure +++ b/configure @@ -175,13 +175,15 @@ USER_SRC_DIR="Cantera/user" # don't change this # thermodynamic properties ENABLE_THERMO='y' +###################################################################### +# optional phase types. These may not be needed by all users. Set them +# to 'n' to omit them from the kernel. -# optional phase types. These WITH_LATTICE_SOLID='y' -WITH_METAL='y' -WITH_STOICH_SUBSTANCE='y' +WITH_METAL='y' +WITH_STOICH_SUBSTANCE='y' WITH_PURE_FLUIDS='y' - +###################################################################### # if set to 'y', the ck2cti program that converts Chemkin input files # to Cantera format will be built. If you don't use Chemkin format # files, or if you run ck2cti on some other machine, you can set this to 'n'.