*** empty log message ***

This commit is contained in:
Dave Goodwin 2003-09-06 00:31:15 +00:00
parent e8ef43a92b
commit 8a74abfd2d
9 changed files with 37 additions and 27 deletions

View file

@ -901,9 +901,9 @@ extern "C" {
}
int DLL_EXPORT ck_to_cti(char* in_file, char* db_file,
char* tr_file, char* id_tag) {
return pip::convert_ck(in_file, db_file, tr_file, id_tag);
}
// int DLL_EXPORT ck_to_cti(char* in_file, char* db_file,
// char* tr_file, char* id_tag) {
// return pip::convert_ck(in_file, db_file, tr_file, id_tag);
// }
}

View file

@ -29,7 +29,7 @@ def isentropic(g = None):
"""
if g == None:
gas = IdealGasMix('gri30.xml')
gas = GRI30()
gas.setState_TPX(1200.0,10.0*OneAtm,'H2:1,N2:0.1')
else:
gas = g

View file

@ -57,18 +57,18 @@ ct_readlog(PyObject *self, PyObject *args)
return Py_BuildValue("s","");
}
static PyObject *
ct_ck2cti(PyObject *self, PyObject *args)
{
int iok;
char *infile, *thermo, *tran, *idtag;
if (!PyArg_ParseTuple(args, "ssss:ck2cti", &infile,
&thermo, &tran, &idtag))
return NULL;
iok = ck_to_cti(infile, thermo, tran, idtag);
if (iok == -1) { return reportCanteraError();}
return Py_BuildValue("i",iok);
}
// static PyObject *
// ct_ck2cti(PyObject *self, PyObject *args)
// {
// int iok;
// char *infile, *thermo, *tran, *idtag;
// if (!PyArg_ParseTuple(args, "ssss:ck2cti", &infile,
// &thermo, &tran, &idtag))
// return NULL;
// iok = ck_to_cti(infile, thermo, tran, idtag);
// if (iok == -1) { return reportCanteraError();}
// return Py_BuildValue("i",iok);
// }

View file

@ -85,7 +85,7 @@ static PyMethodDef ct_methods[] = {
{"ct_print", ct_print, METH_VARARGS},
{"ct_refcnt", ct_refcnt, METH_VARARGS},
{"readlog", ct_readlog, METH_VARARGS},
{"ck2cti", ct_ck2cti, METH_VARARGS},
//{"ck2cti", ct_ck2cti, METH_VARARGS},
{"buildSolutionFromXML", ct_buildSolutionFromXML, METH_VARARGS},
{"Flow", py_flow_new, METH_VARARGS},

View file

@ -166,14 +166,15 @@ namespace Cantera {
void SurfPhase::
setCoveragesByName(string cov) {
int kk = nSpecies();
int k;
compositionMap cc;
for (int k = 0; k < kk; k++) {
for (k = 0; k < kk; k++) {
cc[speciesName(k)] = -1.0;
}
parseCompString(cov, cc);
doublereal c;
vector_fp cv(kk);
for (int k = 0; k < kk; k++) {
for (k = 0; k < kk; k++) {
c = cc[speciesName(k)];
if (c > 0.0) cv[k] = c;
}

View file

@ -14,7 +14,10 @@
#include <string>
#include <stdlib.h>
#include "ctml.h"
#ifndef WIN32
#include "pypath.h"
#endif
using namespace Cantera;
@ -41,7 +44,7 @@ namespace ctml {
f << "from Cantera import *\n";
f.close();
int ierr = 0;
string cmd = pypath() + " " + path + " &> " + tmpDir() + "/log";
string cmd = pypath() + " " + path + " > " + tmpDir() + "/log";
try {
ierr = system(cmd.c_str());
if (ierr != 0) {
@ -82,7 +85,7 @@ namespace ctml {
<< "execfile(file)\n"
<< "write()\n";
f.close();
string cmd = pypath() + " " + path + " &> ct2ctml.log";
string cmd = pypath() + " " + path + " > ct2ctml.log";
int ierr;
try {
ierr = system(cmd.c_str());

View file

@ -40,8 +40,12 @@ namespace Cantera {
*/
class Application {
public:
Application() : linelen(0), stop_on_error(false),
Application() : linelen(0), stop_on_error(false),
#ifdef WIN32
tmp_dir(".") {}
#else
tmp_dir("/tmp") {}
#endif
virtual ~Application() {
map<string, XML_Node*>::iterator pos;
for (pos = xmlfiles.begin(); pos != xmlfiles.end(); ++pos) {

View file

@ -163,7 +163,8 @@ namespace Cantera {
m_eps = tr.eps;
m_alpha = tr.alpha;
m_dipoleDiag.resize(m_nsp);
for (int i = 0; i < m_nsp; i++) {
int i;
for (i = 0; i < m_nsp; i++) {
m_dipoleDiag[i] = tr.dipole(i,i);
}
@ -217,7 +218,7 @@ namespace Cantera {
// precompute and store log(epsilon_ij/k_B)
m_log_eps_k.resize(m_nsp, m_nsp);
int i, j;
int j;
for (i = 0; i < m_nsp; i++) {
for (j = i; j < m_nsp; j++) {
m_log_eps_k(i,j) = log(tr.epsilon(i,j)/Boltzmann);

View file

@ -821,7 +821,8 @@ namespace Cantera {
}
const vector<XML_Node*> &vsc = root->children();
for (int n = 0; n < root->nChildren(); n++) {
int n;
for (n = 0; n < root->nChildren(); n++) {
sc = vsc[n];
if (sc->name() == "phase") {
if (idtarget == "") return sc;
@ -829,7 +830,7 @@ namespace Cantera {
if (idtarget == idattrib) return sc;
}
}
for (int n = 0; n < root->nChildren(); n++) {
for (n = 0; n < root->nChildren(); n++) {
sc = vsc[n];
if (sc->name() != "phase") {
scResult = findXMLPhase(sc, idtarget);