*** empty log message ***

This commit is contained in:
Dave Goodwin 2007-06-11 16:40:37 +00:00
parent 39bdc82fde
commit 5f74aa996e
7 changed files with 22 additions and 2 deletions

View file

@ -88,6 +88,7 @@ static double pfprop(int n, int i, double v=0.0, double x=0.0) {
}
#endif
inline int nThermo() {
return Storage::storage()->nThermo();
}
@ -101,6 +102,11 @@ namespace Cantera {
*/
extern "C" {
int DLL_EXPORT ct_appdelete() {
appdelete();
return 0;
}
//--------------- Phase ---------------------//
int DLL_EXPORT phase_nElements(int n) {

View file

@ -5,6 +5,7 @@
#include "cantera/config.h"
extern "C" {
int DLL_IMPORT ct_appdelete();
int DLL_IMPORT phase_nElements(int n);
int DLL_IMPORT phase_nSpecies(int n);

View file

@ -51,6 +51,12 @@ def addDirectory(dir):
def writeLogFile(file):
return _cantera.ct_writelogfile(file)
def reset():
"""Release all cached Cantera data. Equivalent to
starting a fresh session."""
_cantera.ct_appdelete()
# workaround for case problems in CVS repository file Mixture.py. On some
# systems it appears as mixture.py, and on others as Mixture.py
try:

View file

@ -294,6 +294,8 @@ static PyMethodDef ct_methods[] = {
{"mix_equilibrate", py_mix_equilibrate, METH_VARARGS},
{"mix_getChemPotentials", py_mix_getChemPotentials, METH_VARARGS},
{"ct_appdelete", pyct_appdelete, METH_VARARGS},
#ifdef INCL_USER_PYTHON
#include "usermethods.h"
#endif

View file

@ -63,6 +63,10 @@ static PyObject *ErrorObject;
#include "ctuser_methods.cpp"
#endif
static PyObject*
pyct_appdelete(PyObject *self, PyObject *args) {
return Py_BuildValue("i",ct_appdelete());
}
#include "methods.h"
#include "pylogger.h"

View file

@ -451,6 +451,7 @@ namespace ctml {
}
key.push_back(v[i].substr(0,icolon));
val.push_back(v[i].substr(icolon+1, v[i].size()));
//cout << "getPairs: " << key.back() << " " << val.back() << endl;
}
}

View file

@ -195,7 +195,7 @@ namespace Cantera {
m_u["kJ"] = 1.0e3;
m_u["cal"] = 4.184;
m_u["kcal"] = 4184.0;
m_u["eV"] = 1.60217733e-19;
m_u["eV"] = Faraday; //1.60217733e-19;
// quantity
m_u["mol"] = 1.0e-3;
@ -223,7 +223,7 @@ namespace Cantera {
m_u["hr"] = 3600.0;
m_u["ms"] = 0.001;
m_act_u["eV"] = m_u["eV"]/m_u["molec"];
m_act_u["eV"] = m_u["eV"]; // /m_u["molec"];
m_act_u["K"] = GasConstant;
m_act_u["Kelvin"] = GasConstant;
m_act_u["Dimensionless"] = (GasConstant * 273.15);