*** empty log message ***
This commit is contained in:
parent
145617a15d
commit
330e50eb65
12 changed files with 205 additions and 122 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import sys
|
||||
|
||||
bindir = '/Applications/Cantera/bin'
|
||||
libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.4.0'
|
||||
libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.5.0'
|
||||
incdir = '/Users/dgg/dv/sf/cantera/build/include'
|
||||
dflibdir = ''
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ bllibstr = "-lctlapack -lctblas"
|
|||
bllibs = bllibstr.replace('-l',' ')
|
||||
bllist = bllibs.split()
|
||||
|
||||
bldir = "/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.4.0"
|
||||
bldir = "/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.5.0"
|
||||
|
||||
libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes',
|
||||
'cvode', 'ctmath', 'tpx']
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
// Copyright 2001 California Institute of Technology
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.13 2004-08-28 16:12:41 dggoodwin
|
||||
// Revision 1.14 2004-09-13 11:22:21 dggoodwin
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.13 2004/08/28 16:12:41 dggoodwin
|
||||
// cleanup
|
||||
//
|
||||
// Revision 1.12 2004/08/05 14:56:57 dggoodwin
|
||||
|
|
@ -178,7 +181,7 @@ namespace ckr {
|
|||
* @todo allow non-integral stoichiometric coefficients
|
||||
*/
|
||||
static void getSpecies(string s,
|
||||
int n, vector<RxnSpecies>& species)
|
||||
int n, vector<RxnSpecies>& species, bool debug, ostream& log)
|
||||
{
|
||||
char* begin = new char[n+1];
|
||||
copy(s.begin(), s.end(), begin);
|
||||
|
|
@ -212,6 +215,9 @@ namespace ckr {
|
|||
ss.name = syms[j];
|
||||
ss.number = coeffs[j];
|
||||
species.push_back(ss);
|
||||
if (debug) {
|
||||
log << ss.number << " " << ss.name << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +267,7 @@ namespace ckr {
|
|||
* Constructor. Construct a parser for the specified input file.
|
||||
*/
|
||||
CKParser::CKParser(istream* infile, const string& fname, ostream* log)
|
||||
: verbose(true), m_line (0) {
|
||||
: verbose(true), m_line (0), debug(false) {
|
||||
m_ckfile = infile;
|
||||
m_ckfilename = fname;
|
||||
m_log = log;
|
||||
|
|
@ -329,9 +335,9 @@ namespace ckr {
|
|||
if (ch == char13 || (ch == char10 && (m_last_eol != char13))) {
|
||||
#undef DEBUG_EOL
|
||||
#ifdef DEBUG_EOL
|
||||
cout << "EOL: found character " << int(ch) << " ending line:" << endl;
|
||||
cout << line << endl;
|
||||
cout << int(m_last_eol) << " " << int('\n') << " " << int(ch) << endl;
|
||||
*m_log << "EOL: found character " << int(ch) << " ending line:" << endl;
|
||||
*m_log << line << endl;
|
||||
*m_log << int(m_last_eol) << " " << int('\n') << " " << int(ch) << endl;
|
||||
#endif
|
||||
m_last_eol = ch;
|
||||
break;
|
||||
|
|
@ -868,6 +874,10 @@ next:
|
|||
vector<string> cm;
|
||||
bool ok = true;
|
||||
|
||||
if (debug) {
|
||||
*m_log << "CKParser::readReactions ---> DEBUG MODE" << endl;
|
||||
}
|
||||
|
||||
while (1 > 0) {
|
||||
|
||||
// skip blank or comment lines
|
||||
|
|
@ -879,7 +889,7 @@ next:
|
|||
|
||||
#undef DEBUG_LINE
|
||||
#ifdef DEBUG_LINE
|
||||
cout << "Line: " << s << endl;
|
||||
*m_log << "Line: " << s << endl;
|
||||
#endif
|
||||
// end of REACTION section or EOF
|
||||
/// @todo does this handle case of 1 reaction correctly?
|
||||
|
|
@ -960,6 +970,9 @@ next:
|
|||
rxn = Reaction();
|
||||
rxn.comment = cm;
|
||||
cm.clear();
|
||||
if (debug) {
|
||||
*m_log << "Parsing reaction " << nRxns << endl;
|
||||
}
|
||||
}
|
||||
else auxDataLine = true;
|
||||
if (comment != "") rxn.lines.push_back(s+'!'+comment);
|
||||
|
|
@ -990,10 +1003,21 @@ next:
|
|||
else throw CK_SyntaxError(*m_log,
|
||||
"expected <=>, =>, or =", m_line);
|
||||
|
||||
if (debug) {
|
||||
*m_log << s << endl;
|
||||
if (rxn.isReversible)
|
||||
*m_log << "Reaction is reversible." << endl;
|
||||
else
|
||||
*m_log << "Reaction is irreversible." << endl;
|
||||
}
|
||||
|
||||
string::size_type mloc, mloc2;
|
||||
|
||||
// process reactants
|
||||
// process reactants
|
||||
if (debug) *m_log << "Processing reactants..." << sleft << endl;
|
||||
removeWhiteSpace(sleft);
|
||||
if (debug) *m_log << "After removing white space: "
|
||||
<< sleft << endl;
|
||||
rxn.isFalloffRxn = false;
|
||||
|
||||
string sm, mspecies;
|
||||
|
|
@ -1013,6 +1037,10 @@ next:
|
|||
else {
|
||||
rxn.thirdBody = mspecies;
|
||||
}
|
||||
if (debug) {
|
||||
*m_log << "Falloff reaction. Third body = "
|
||||
<< rxn.thirdBody << endl;
|
||||
}
|
||||
}
|
||||
else throw CK_SyntaxError(*m_log,
|
||||
"missing )", m_line);
|
||||
|
|
@ -1027,11 +1055,20 @@ next:
|
|||
rxn.type = ThreeBody;
|
||||
sleft = sleft.substr(0, mloc);
|
||||
rxn.thirdBody = "M";
|
||||
if (debug) {
|
||||
*m_log << "Three-body reaction." << endl;
|
||||
}
|
||||
}
|
||||
else if (debug) {
|
||||
*m_log << "Reactant string contains +M or +m, but \n"
|
||||
<< "not last two characters of string: "
|
||||
<< "\"" << sleft << "\"\n"
|
||||
<< "NOT a three-body reaction." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
getSpecies(sleft.c_str(),static_cast<int>(sleft.size()),
|
||||
rxn.reactants);
|
||||
rxn.reactants, debug, *m_log);
|
||||
int ir = static_cast<int>(rxn.reactants.size());
|
||||
for (int iir = 0; iir < ir; iir++) {
|
||||
if (find(speciesNames.begin(), speciesNames.end(),
|
||||
|
|
@ -1059,9 +1096,14 @@ next:
|
|||
<< m_line << endl;
|
||||
//throw CK_SyntaxError(*m_log, "negative prefactor", m_line);
|
||||
|
||||
if (debug) *m_log << "Processing products..." << sright << endl;
|
||||
sright = sright.substr(0, sright.find(toks[ntoks - 3]) - 1 );
|
||||
if (debug) *m_log << "After removing Arrhenius parameters, "
|
||||
<< "\nproduct string = " << sright << endl;
|
||||
|
||||
removeWhiteSpace(sright);
|
||||
if (debug) *m_log << "After removing white space: "
|
||||
<< sright << endl;
|
||||
mloc = sright.find("(+");
|
||||
if (mloc != string::npos) {
|
||||
sm = sright.substr(mloc+2, 1000);
|
||||
|
|
@ -1075,6 +1117,10 @@ next:
|
|||
|
||||
rxn.isFalloffRxn = true;
|
||||
rxn.type = Falloff;
|
||||
if (debug) {
|
||||
*m_log << "Falloff reaction. Third body = "
|
||||
<< rxn.thirdBody << endl;
|
||||
}
|
||||
}
|
||||
else throw CK_SyntaxError(*m_log,
|
||||
"missing )", m_line);
|
||||
|
|
@ -1104,10 +1150,19 @@ next:
|
|||
rxn.isThreeBodyRxn = true;
|
||||
rxn.thirdBody = "M";
|
||||
sright = sright.substr(0, mloc);
|
||||
if (debug) {
|
||||
*m_log << "Three-body reaction." << endl;
|
||||
}
|
||||
}
|
||||
else if (debug) {
|
||||
*m_log << "Product string contains +M or +m, but \n"
|
||||
<< "not last two characters of string: "
|
||||
<< "\"" << sright << "\"\n"
|
||||
<< "NOT a three-body reaction." << endl;
|
||||
}
|
||||
}
|
||||
getSpecies(sright.c_str(),static_cast<int>(sright.size()),
|
||||
rxn.products);
|
||||
rxn.products, debug, *m_log);
|
||||
int ip = static_cast<int>(rxn.products.size());
|
||||
for (int iip = 0; iip < ip; iip++) {
|
||||
if (find(speciesNames.begin(), speciesNames.end(),
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace ckr {
|
|||
reactionList& reactions, ReactionUnits& units);
|
||||
bool advanceToKeyword(const string& kw, const string& stop);
|
||||
bool verbose;
|
||||
bool debug;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ bool CKReader::read(const string& inputFile, const string& thermoDatabase,
|
|||
// construct a parser for the input file
|
||||
CKParser parser(&ckinfile, inputFile, &log);
|
||||
parser.verbose = verbose;
|
||||
parser.debug = debug;
|
||||
|
||||
// write header information to the log file
|
||||
struct tm *newtime;
|
||||
|
|
@ -78,6 +79,13 @@ bool CKReader::read(const string& inputFile, const string& thermoDatabase,
|
|||
<< " mechanism validation disabled" << endl
|
||||
<< "*****************************************" << endl;
|
||||
|
||||
if (debug) {
|
||||
log << "*** DEBUG MODE ***" << endl;
|
||||
}
|
||||
else {
|
||||
log << "debugging disabled." << endl;
|
||||
}
|
||||
|
||||
//----------- process ELEMENT section ----------------------
|
||||
|
||||
bool elok = parser.readElementSection(elements);
|
||||
|
|
@ -152,6 +160,7 @@ bool CKReader::read(const string& inputFile, const string& thermoDatabase,
|
|||
ifstream thermofile(thermoDatabase.c_str());
|
||||
CKParser thermReader(&thermofile, thermoDatabase, &log);
|
||||
thermReader.verbose = verbose;
|
||||
thermReader.debug = debug;
|
||||
int dbflag = HasTempRange;
|
||||
vector<string> dummy;
|
||||
thermReader.readThermoSection(dummy, speciesData, temp, dbflag, log);
|
||||
|
|
@ -208,6 +217,7 @@ bool CKReader::read(const string& inputFile, const string& thermoDatabase,
|
|||
ifstream thermofile(thermoDatabase.c_str());
|
||||
CKParser thermoReader(&thermofile, thermoDatabase, &log);
|
||||
thermoReader.verbose = verbose;
|
||||
thermoReader.debug = debug;
|
||||
int dbflag = HasTempRange;
|
||||
thermoReader.readThermoSection(undef, speciesData, temp, dbflag, log);
|
||||
undefined = 0;
|
||||
|
|
@ -249,6 +259,7 @@ bool CKReader::read(const string& inputFile, const string& thermoDatabase,
|
|||
// construct a new parser for the input file
|
||||
CKParser parser2(&ckinfile2, inputFile, &log);
|
||||
parser2.verbose = verbose;
|
||||
parser2.debug = debug;
|
||||
|
||||
parser2.readReactionSection(speciesSymbols, elementSymbols, reactions, units);
|
||||
log << "\nread " << static_cast<int>(reactions.size())
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
* Constructor. Construct a new CKReader instance. By default,
|
||||
* validation is enabled, as well as verbose output to the log file.
|
||||
*/
|
||||
CKReader() : verbose(true), validate(true) {}
|
||||
CKReader() : verbose(true), validate(true), debug(false) {}
|
||||
|
||||
/// Destructor. Does nothing.
|
||||
~CKReader() {}
|
||||
|
|
@ -67,6 +67,7 @@ public:
|
|||
|
||||
bool verbose; ///< print detailed messages to log file
|
||||
bool validate; ///< validate elements, species, and reaction
|
||||
bool debug; ///< enable debugging output
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -411,10 +411,13 @@ namespace pip {
|
|||
|
||||
|
||||
int convert_ck(const char* in_file, const char* db_file,
|
||||
const char* tr_file, const char* id_tag) {
|
||||
const char* tr_file, const char* id_tag, bool debug) {
|
||||
ckr::CKReader r;
|
||||
|
||||
cout << "convert_ck: debug = " << debug << endl;
|
||||
|
||||
r.validate = true;
|
||||
r.debug = debug;
|
||||
//int i=1;
|
||||
|
||||
string infile = string(in_file);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace pip {
|
|||
void ck2ct(string idtag, ckr::CKReader& r);
|
||||
|
||||
int convert_ck(const char* in_file, const char* db_file,
|
||||
const char* tr_file, const char* id_tag);
|
||||
const char* tr_file, const char* id_tag, bool debug);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,6 @@
|
|||
#define CT_UTILITIES_H
|
||||
|
||||
#include "ct_defs.h"
|
||||
//#include <math.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
#ifdef HAVE_INTEL_MKL
|
||||
#include "mkl_vml.h"
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
|
|
@ -144,11 +135,7 @@ namespace Cantera {
|
|||
template<class _InputIter, class _OutputIter>
|
||||
inline void divide_each(_OutputIter x_begin, _OutputIter x_end,
|
||||
_InputIter y_begin) {
|
||||
#ifdef HAVE_INTEL_MKL
|
||||
vdDiv(int(x_end - x_begin), x_begin, y_begin, x_begin);
|
||||
#else
|
||||
for(; x_begin != x_end; ++x_begin, ++y_begin) *x_begin /= *y_begin;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -225,38 +212,7 @@ namespace Cantera {
|
|||
sum += (*__begin) * log(*_Q_begin + Tiny);
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
/** calls method 'update' for each object in a range, and writes the
|
||||
* result into indexed positions in sequence 'output'.
|
||||
*
|
||||
* \code
|
||||
* vector<Foo> x(3);
|
||||
* vector<int> index(3);
|
||||
* index[0] = 9;
|
||||
* index[1] = 2;
|
||||
* index[3] = 16;
|
||||
* vector<double> output(20);
|
||||
* _scatter_update(x.begin(), x.end(), output.begin(), index.begin());
|
||||
* \endcode
|
||||
*/
|
||||
// template<class _InputIter, class _OutputIter,
|
||||
// class _IndexIter, class _Params>
|
||||
// inline void _scatter_update(_InputIter __begin, _InputIter __end,
|
||||
// _OutputIter __result, _IndexIter __index, const _Params& __params) {
|
||||
// for (; __begin != __end; ++__begin, ++__index) {
|
||||
// *(__result + *__index) = (*__begin).update(__params);
|
||||
// }
|
||||
// }
|
||||
|
||||
// template<class _InputIter, class _OutputIter, class _Params>
|
||||
// inline void _update(_InputIter __begin, _InputIter __end,
|
||||
// _OutputIter __result, const _Params& __params) {
|
||||
// for (; __begin != __end; ++__begin, ++__result) {
|
||||
// *__result = (*__begin).update(__params);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
69
config/configure
vendored
69
config/configure
vendored
|
|
@ -271,7 +271,7 @@ PACKAGE_STRING=
|
|||
PACKAGE_BUGREPORT=
|
||||
|
||||
ac_unique_file="Cantera.README"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CVF_LIBDIR local_inst local_python_inst python_prefix ctversion homedir ct_libdir ct_incdir ct_incroot ct_bindir ct_datadir ct_demodir ct_templdir ct_mandir ct_tutdir ct_docdir ct_dir COMPACT_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os username ctroot buildinc buildlib buildbin MAKE ARCHIVE DO_RANLIB RANLIB SOEXT SHARED PIC LCXX_FLAGS LCXX_END_LIBS USERDIR INCL_USER_CODE KERNEL BUILD_CK LIB_DIR build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_DIR build_with_f2c LOCAL_LIB_DIRS LOCAL_LIBS CANTERA_PARTICLES_DIR BUILD_PARTICLES CT_SHARED_LIB F77FLAGS PYTHON_CMD WIN_PYTHON_CMD BUILD_PYTHON MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC F77 FFLAGS ac_ct_F77 FLIBS BUILD_F90 F90 F90FLAGS precompile_headers CXX_DEPENDS OS_IS_DARWIN OS_IS_WIN OS_IS_CYGWIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT local_math_libs math_libs SO LDSHARED LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CVF_LIBDIR local_inst local_python_inst python_prefix python_win_prefix ctversion homedir ct_libdir ct_incdir ct_incroot ct_bindir ct_datadir ct_demodir ct_templdir ct_mandir ct_tutdir ct_docdir ct_dir COMPACT_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os username ctroot buildinc buildlib buildbin MAKE ARCHIVE DO_RANLIB RANLIB SOEXT SHARED PIC LCXX_FLAGS LCXX_END_LIBS USERDIR INCL_USER_CODE KERNEL BUILD_CK LIB_DIR build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_DIR build_with_f2c LOCAL_LIB_DIRS LOCAL_LIBS CANTERA_PARTICLES_DIR BUILD_PARTICLES CT_SHARED_LIB F77FLAGS PYTHON_CMD WIN_PYTHON_CMD BUILD_PYTHON MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC F77 FFLAGS ac_ct_F77 FLIBS BUILD_F90 F90 F90FLAGS precompile_headers CXX_DEPENDS OS_IS_DARWIN OS_IS_WIN OS_IS_CYGWIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT local_math_libs math_libs SO LDSHARED LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
|
@ -1277,10 +1277,11 @@ esac
|
|||
|
||||
CVF_LIBDIR=""
|
||||
if test "x${OS_IS_CYGWIN}" = "x1"; then
|
||||
if test "${USE_VISUAL_STUDIO}" = "y"; then
|
||||
OS_IS_WIN=1;
|
||||
CVF_LIBDIR=$FORTRAN_LIB_DIR
|
||||
fi
|
||||
if test "${USE_VISUAL_STUDIO}" = "y"; then
|
||||
OS_IS_WIN=1;
|
||||
OS_IS_CYGWIN=0;
|
||||
CVF_LIBDIR=$FORTRAN_LIB_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -1290,7 +1291,7 @@ if test "x$OS_IS_DARWIN" = "x1"; then prdef="/Applications/Cantera"; fi
|
|||
|
||||
local_inst=1
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
if test "x${OS_IS_CYGWIN}" = "x1"; then
|
||||
if test "x${OS_IS_CYGWIN}" = "x1" -o "x${OS_IS_WIN}" = "x1" ; then
|
||||
prefix=${CANTERA_INSTALL_DIR}
|
||||
# mkdir ${prefix}
|
||||
else
|
||||
|
|
@ -1311,30 +1312,41 @@ if test "x${prefix}" = "xNONE"; then
|
|||
fi
|
||||
|
||||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
prefix=`cygpath -a -w "${prefix}" | sed 's/\\\/\\//g'`
|
||||
prefix=`cygpath -a -m "${prefix}" `
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "Cantera will be installed in ${prefix}"
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Determination of Python site-package directory location
|
||||
#
|
||||
local_python_inst=${local_inst}
|
||||
if test "x${SET_PYTHON_SITE_PACKAGE_TOPDIR}" = "xy"; then
|
||||
python_prefix=${PYTHON_SITE_PACKAGE_TOPDIR}
|
||||
python_win_prefix=$python_prefix
|
||||
if test "x${OS_IS_WIN}" = "x1" ; then
|
||||
python_prefix=`cygpath -a -m "${python_prefix}"`
|
||||
python_win_prefix=`cygpath -a -w "${python_prefix}"`
|
||||
elif test "x${OS_IS_CYGWIN}" = "x1" ; then
|
||||
python_prefix=`cygpath -a -u "${python_prefix}"`
|
||||
python_win_prefix=`cygpath -a -w "${python_prefix}"`
|
||||
fi
|
||||
local_python_inst=1
|
||||
echo "Cantera's Python packages will be installed in ${python_prefix}"
|
||||
else
|
||||
python_prefix=$prefix
|
||||
python_win_prefix=$python_prefix
|
||||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
python_win_prefix=`cygpath -a -w "${python_prefix}" `
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctversion=${CANTERA_VERSION}
|
||||
|
||||
|
||||
|
|
@ -1505,7 +1517,7 @@ test -n "$target_alias" &&
|
|||
ctroot=`(cd ..;pwd)`
|
||||
builddir=$target
|
||||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
ctroot=`cygpath -a -w "${ctroot}" | sed 's/\\\/\\//g'`
|
||||
ctroot=`cygpath -a -m "${ctroot}" | sed 's/\\\/\\//g'`
|
||||
builddir="i686-pc-win32"
|
||||
fi
|
||||
|
||||
|
|
@ -1529,14 +1541,18 @@ cat >>confdefs.h <<_ACEOF
|
|||
#define DARWIN $OS_IS_DARWIN
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
if test "x${OS_IS_CYGWIN}" = "x1"; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CYGWIN $OS_IS_CYGWIN
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
fi
|
||||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define WINMSVC $OS_IS_WIN
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define RXNPATH_FONT "$RPFONT"
|
||||
_ACEOF
|
||||
|
|
@ -1935,11 +1951,15 @@ fi
|
|||
done
|
||||
test -n "$WIN_PYTHON_CMD" || WIN_PYTHON_CMD=""none""
|
||||
|
||||
WIN_PYTHON_CMD=`cygpath -a -w "$WIN_PYTHON_CMD" | sed 's/\\\/\\//g'`
|
||||
WIN_PYTHON_CMD=`cygpath -a -m "$WIN_PYTHON_CMD"`
|
||||
echo "Windows Python command: $WIN_PYTHON_CMD"
|
||||
fi
|
||||
else
|
||||
echo "Python command preset to $PYTHON_CMD"
|
||||
if test "x$OS_IS_WIN" = "x1"; then
|
||||
WIN_PYTHON_CMD=`cygpath -a -m "$PYTHON_CMD"`
|
||||
echo "Windows Python Command set to $WIN_PYTHON_CMD"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$PYTHON_CMD" = "none"; then
|
||||
|
|
@ -2019,10 +2039,15 @@ fi
|
|||
else
|
||||
echo "Matlab command preset to $(MATLAB_CMD)$"
|
||||
fi
|
||||
fi
|
||||
if test "x$OS_IS_WIN" = "x1"; then
|
||||
MATLAB_CMD=`cygpath -a -w "$MATLAB_CMD" | sed 's/\\\/\\//g'`
|
||||
if test "x$OS_IS_WIN" = "x1"; then
|
||||
MATLAB_CMD=`cygpath -a -m "$MATLAB_CMD" `
|
||||
echo "Windows MATLAB command: ${MATLAB_CMD}"
|
||||
fi
|
||||
else
|
||||
echo "MATLAB interface will not be installed"
|
||||
if test -z "$MATLAB_CMD"; then
|
||||
MATLAB_CMD="matlab"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -3440,7 +3465,7 @@ fi
|
|||
|
||||
|
||||
# Provide some information about the compiler.
|
||||
echo "$as_me:3443:" \
|
||||
echo "$as_me:3468:" \
|
||||
"checking for Fortran 77 compiler version" >&5
|
||||
ac_compiler=`set X $ac_compile; echo $2`
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
|
||||
|
|
@ -3617,7 +3642,7 @@ _ACEOF
|
|||
# flags.
|
||||
ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS="$FFLAGS $ac_verb"
|
||||
(eval echo $as_me:3620: \"$ac_link\") >&5
|
||||
(eval echo $as_me:3645: \"$ac_link\") >&5
|
||||
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
|
||||
echo "$ac_f77_v_output" >&5
|
||||
FFLAGS=$ac_save_FFLAGS
|
||||
|
|
@ -3697,7 +3722,7 @@ _ACEOF
|
|||
# flags.
|
||||
ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
|
||||
(eval echo $as_me:3700: \"$ac_link\") >&5
|
||||
(eval echo $as_me:3725: \"$ac_link\") >&5
|
||||
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
|
||||
echo "$ac_f77_v_output" >&5
|
||||
FFLAGS=$ac_save_FFLAGS
|
||||
|
|
@ -4638,6 +4663,7 @@ s,@CVF_LIBDIR@,$CVF_LIBDIR,;t t
|
|||
s,@local_inst@,$local_inst,;t t
|
||||
s,@local_python_inst@,$local_python_inst,;t t
|
||||
s,@python_prefix@,$python_prefix,;t t
|
||||
s,@python_win_prefix@,$python_win_prefix,;t t
|
||||
s,@ctversion@,$ctversion,;t t
|
||||
s,@homedir@,$homedir,;t t
|
||||
s,@ct_libdir@,$ct_libdir,;t t
|
||||
|
|
@ -5198,6 +5224,9 @@ fi
|
|||
# )
|
||||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
cp -f ../config.h ../Cantera/src
|
||||
cd ../ext/f2c_libs
|
||||
cp arith.hwin32 arith.h
|
||||
cd ../../config
|
||||
fi
|
||||
if test -f "../test_problems/ck2cti_test/runtest"; then
|
||||
chmod +x ../test_problems/ck2cti_test/runtest
|
||||
|
|
|
|||
99
configure
vendored
99
configure
vendored
|
|
@ -48,14 +48,15 @@ CANTERA_CONFIG_PREFIX=${CANTERA_CONFIG_PREFIX:=""}
|
|||
CANTERA_INSTALL_DIR=${CANTERA_INSTALL_DIR:="c:/cantera"}
|
||||
|
||||
# On a PC running MS-Windows, Cantera can be built either using
|
||||
# Microsoft Visual Studio, with the Visual C++ and Visual Fortran
|
||||
# compilers, or using the linux-like cygwin environment with the
|
||||
# g++ and g77 compilers. Set this to "y" to use Visual Studio.
|
||||
# Microsoft Visual Studio, with the Visual C++ and (optionally)
|
||||
# Visual Fortran compilers, or using the linux-like cygwin
|
||||
# environment with the g++ and g77 compilers. Set this to "y" to use
|
||||
# Visual Studio.
|
||||
USE_VISUAL_STUDIO=${USE_VISUAL_STUDIO:="y"}
|
||||
|
||||
# If you are using Visual Studio, set this to the location of the
|
||||
# directory containing the Fortran libraries. This is only needed to
|
||||
# build the Matlab interface.
|
||||
# build the Matlab interface.
|
||||
FORTRAN_LIB_DIR="D:\Program Files\Microsoft Visual Studio\DF98\LIB"
|
||||
|
||||
|
||||
|
|
@ -65,12 +66,13 @@ FORTRAN_LIB_DIR="D:\Program Files\Microsoft Visual Studio\DF98\LIB"
|
|||
#
|
||||
# Cantera has several programming language interfaces. Select the ones
|
||||
# you want to build. The default is to try to build all language
|
||||
# interfaces. The Python interface will be built, the MATLAB
|
||||
# interface will too if MATLAB is found, the Fortran 90/95 interface
|
||||
# will be built if a Fortran 90/95 compiler is found on your
|
||||
# interfaces. The Python interface will be built by default, the
|
||||
# MATLAB interface will too if MATLAB is found, the Fortran 90/95
|
||||
# interface will be built if a Fortran 90/95 compiler is found on your
|
||||
# system. You can customize these defaults by setting parameters in
|
||||
# this section.
|
||||
#
|
||||
#
|
||||
#----------------- Python --------------------------------------------
|
||||
#
|
||||
# In addition to being one of the supported language interfaces,
|
||||
|
|
@ -80,12 +82,12 @@ FORTRAN_LIB_DIR="D:\Program Files\Microsoft Visual Studio\DF98\LIB"
|
|||
# http://www.python.org before proceeding with the installation of
|
||||
# Cantera.
|
||||
#
|
||||
# If you plan to write Python scripts yourself to solve problems, or
|
||||
# you want to use the graphical MixMaster application, then you need
|
||||
# the Cantera Python Package. If, on the other hand, you will only use
|
||||
# Cantera from some other language (e.g. MATLAB or Fortran 90/95) and
|
||||
# only need Python to process .cti files, then you only need a minimal
|
||||
# subset of the package (actually, only one file).
|
||||
# If you plan to work in Python, or you want to use the graphical
|
||||
# MixMaster application, then you need the Cantera Python Package. If,
|
||||
# on the other hand, you will only use Cantera from some other
|
||||
# language (e.g. MATLAB or Fortran 90/95) and only need Python to
|
||||
# process .cti files, then you only need a minimal subset of the
|
||||
# package (actually, only one file).
|
||||
|
||||
# Set PYTHON_PACKAGE to one of these two strings:
|
||||
# full install everything needed to use Cantera from Python
|
||||
|
|
@ -94,11 +96,11 @@ FORTRAN_LIB_DIR="D:\Program Files\Microsoft Visual Studio\DF98\LIB"
|
|||
PYTHON_PACKAGE=${PYTHON_PACKAGE:="full"}
|
||||
|
||||
|
||||
# Cantera needs to know where to find the Python interpreter. By
|
||||
# default, the configuration process will look for it somewhere on
|
||||
# your PATH, either as 'python2' or as 'python'. If it is not on the
|
||||
# PATH, or has a different name, set this to the full path to the
|
||||
# Python interpreter.
|
||||
# Cantera needs to know where to find the Python interpreter. If
|
||||
# PYTHON_CMD is set to "default", then the configuration process will
|
||||
# look for the Python Interpreter somewhere on your PATH, either as
|
||||
# 'python2' or as 'python'. If it is not on the PATH, or has a
|
||||
# different name, set this to the full path to the Python interpreter.
|
||||
PYTHON_CMD=${PYTHON_CMD:="default"}
|
||||
|
||||
|
||||
|
|
@ -116,36 +118,51 @@ PYTHON_SITE_PACKAGE_TOPDIR=${PYTHON_SITE_PACKAGE_TOPDIR:="/usr/local"}
|
|||
|
||||
#----------- MATLAB --------------------------------------------------
|
||||
|
||||
# Set this to "y" if you want to build the MATLAB toolbox. MATLAB must
|
||||
# be installed on your system first, since the build process runs a
|
||||
# Matlab script. If this is set to "y" but MATLAB is not found, the
|
||||
# MATLAB toolbox will not be built. Note that you may need to run 'mex
|
||||
# -setup' within MATLAB to configure it for your C++ compiler before
|
||||
# building the Cantera MATLAB Toolbox.
|
||||
# This variable controls whether the MATLAB toolbox will be built. It
|
||||
# should be set to one of these strings:
|
||||
#
|
||||
# "default" the 'configure' script will try to build a simple
|
||||
# MATLAB MEX file. If this succeeds, BUILD_MATLAB_TOOLBOX
|
||||
# will be set to "y", otherwise it will be set to "n".
|
||||
#
|
||||
# "y" build the MATLAB toolbox.
|
||||
# "n" do not build the MATLAB toolbox, even if MATLAB is
|
||||
# installed.
|
||||
#
|
||||
# Note that you may need to run 'mex -setup' within MATLAB to
|
||||
# configure it for your C++ compiler before running this script.
|
||||
|
||||
BUILD_MATLAB_TOOLBOX=${BUILD_MATLAB_TOOLBOX:="y"}
|
||||
BUILD_MATLAB_TOOLBOX=${BUILD_MATLAB_TOOLBOX:="default"}
|
||||
|
||||
|
||||
|
||||
#----------- Fortran 90/95 --------------------------------------------------
|
||||
|
||||
# Set this to "y" if you want to build the Fortran 90/95 interface.
|
||||
# A Fortran 90/95 compiler is required. If none is found, the Fortran 90/95
|
||||
# interface will not be built.
|
||||
# This variable controls whether the Fortran 90/95 interface will be
|
||||
# built. It should be set to one of these strings:
|
||||
#
|
||||
# "default" The 'configure' script will attempt to compile a small
|
||||
# Fortran 90/05 program; if this succeeds,
|
||||
# BUILD_F90_INTERFACE will be set to "y", and otherwise to "n".
|
||||
# "y" Build the Fortran 90/95 interface.
|
||||
# "n" Do not build the Fortran 90/95 interface, even if a
|
||||
# Fortran 90/95 compiler is installed.
|
||||
|
||||
BUILD_F90_INTERFACE=${BUILD_F90_INTERFACE:="y"}
|
||||
|
||||
# The Fortran 90/95 compiler
|
||||
|
||||
# The Fortran 90/95 compiler.
|
||||
F90=${F90:=f95}
|
||||
|
||||
# Compiler option flags for the Fortran 90/95 compiler. If you are
|
||||
# using the Absoft or the NAG compiler, additional options specific to
|
||||
# these compilers will be added automatically, and you do not need to
|
||||
# specify them here. Otherwise, add any required compiler-specific
|
||||
# flas here.
|
||||
# flags here.
|
||||
F90FLAGS=${F90FLAGS:='-O2'}
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Customizations / Extensions
|
||||
#----------------------------------------------------------------------
|
||||
|
|
@ -208,7 +225,7 @@ ENABLE_RXNPATH='y'
|
|||
|
||||
# non-ideal pure substance models for a few fluids imported from the
|
||||
# 'TPX' package. (http://adam.caltech.edu/software/tpx)
|
||||
ENABLE_TPX='y'
|
||||
ENABLE_TPX='y'
|
||||
|
||||
|
||||
|
||||
|
|
@ -224,9 +241,13 @@ ENABLE_TPX='y'
|
|||
# libraries, and set BLAS_LAPACK_DIR to the directory where these
|
||||
# libraries are located. Otherwise, leave these lines commented out.
|
||||
#
|
||||
# (The settings shown here are appropriate if you are using the ATLAS
|
||||
# libraries.)
|
||||
#
|
||||
#BLAS_LAPACK_LIBS='-llapack -lf77blas -lcblas -latlas'
|
||||
#BLAS_LAPACK_DIR='/usr/lib'
|
||||
#
|
||||
#
|
||||
# The options below do not need to be set if you are using the default
|
||||
# libraries.
|
||||
#
|
||||
|
|
@ -258,7 +279,7 @@ CXXFLAGS=${CXXFLAGS:="-O2 -Wall"}
|
|||
|
||||
# the C++ flags required for linking. Uncomment if additional flags
|
||||
# need to be passed to the linker.
|
||||
#LCXX_FLAGS="-framework vecLib"
|
||||
#LCXX_FLAGS="-framework vecLib"
|
||||
|
||||
# Ending libraries to tack onto the linking of all C++ programs
|
||||
LCXX_END_LIBS=${LCXX_END_LIBS:="-lm"}
|
||||
|
|
@ -276,7 +297,8 @@ SHARED=${SHARED:="-shared"}
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
# Cantera uses several external software packages, which are all in
|
||||
# the 'ext' directory.. These options control how these packages are built.
|
||||
# the 'ext' directory.. These options control how these packages are
|
||||
# built.
|
||||
|
||||
# For external procedures written in Fortran 77, both the original F77
|
||||
# source code and C souce code generated by the 'f2c' program are
|
||||
|
|
@ -289,7 +311,7 @@ SHARED=${SHARED:="-shared"}
|
|||
# Note, if set to "y", Cantera does not need a fortran compiler, and
|
||||
# all fortran compiler parameters below are irrelevant.
|
||||
|
||||
BUILD_WITH_F2C=${BUILD_WITH_F2C:="default"}
|
||||
BUILD_WITH_F2C=${BUILD_WITH_F2C:="y"}
|
||||
|
||||
# if you are building the external Fortran 77 procedures from the Fortran
|
||||
# source code, enter the compiler here.
|
||||
|
|
@ -308,8 +330,9 @@ FFLAGS=${FFLAGS:='-O2'}
|
|||
# other programs
|
||||
#------------------------------------------------------
|
||||
|
||||
# the command to create a static library
|
||||
ARCHIVE=${ARCHIVE:="ar ruv"}
|
||||
# the command to create a static library.
|
||||
ARCHIVE=${ARCHIVE:="ar ruv"} # linux
|
||||
# ARCHIVE=${ARCHIVE:="libtool -static -o"} # Mac OSX
|
||||
|
||||
# the command to run 'ranlib' if it is needed.
|
||||
RANLIB=${RANLIB:="ranlib"}
|
||||
|
|
@ -319,13 +342,11 @@ RANLIB=${RANLIB:="ranlib"}
|
|||
# doesn't work, try GNU make.
|
||||
MAKE=${MAKE:=make}
|
||||
|
||||
#
|
||||
|
||||
# file extensions
|
||||
CXX_EXT=${CXX_EXT:=cpp}
|
||||
F77_EXT=${F77_EXT:=f}
|
||||
F90_EXT=${F90_EXT:=f90}
|
||||
#OBJ_EXT=
|
||||
#EXE_EXT=
|
||||
|
||||
|
||||
CT_SHARED_LIB=${CT_SHARED_LIB:=clib}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ TREEVIEW_WIDTH = 250
|
|||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = YES
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ int showHelp() {
|
|||
cout << " -i <input file> \n"
|
||||
<< " -t <thermo database> \n"
|
||||
<< " -tr <transport database> \n"
|
||||
<< " -id <identifier> \n\n"
|
||||
<< " -id <identifier> \n"
|
||||
<< " -d print debugging output \n\n"
|
||||
<< "The results are written to the standard output.\n";
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -62,6 +63,7 @@ int showHelp() {
|
|||
int main(int argc, char** argv) {
|
||||
string infile="chem.inp", dbfile="", trfile="", logfile;
|
||||
string idtag = "gas";
|
||||
bool debug = false;
|
||||
int i=1;
|
||||
if (argc == 1) return showHelp();
|
||||
|
||||
|
|
@ -84,6 +86,10 @@ int main(int argc, char** argv) {
|
|||
idtag = argv[i+1];
|
||||
}
|
||||
}
|
||||
else if (arg == "-d") {
|
||||
debug = true;
|
||||
cout << "### DEBUG MODE ###" << endl;
|
||||
}
|
||||
else if (arg == "-h" || argc < 3) {
|
||||
return showHelp();
|
||||
}
|
||||
|
|
@ -91,7 +97,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
|
||||
int ierr = pip::convert_ck(infile.c_str(), dbfile.c_str(), trfile.c_str(),
|
||||
idtag.c_str());
|
||||
idtag.c_str(), debug);
|
||||
|
||||
if (ierr < 0) {
|
||||
showErrors(cerr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue