diff --git a/Cantera/src/ChemEquil.h b/Cantera/src/ChemEquil.h index c55e24b82..aace1434f 100755 --- a/Cantera/src/ChemEquil.h +++ b/Cantera/src/ChemEquil.h @@ -177,7 +177,7 @@ namespace Cantera { inline void equilibrate(thermo_t& s, int XY) { ChemEquil e; //try { - int istatus = e.equilibrate(s,XY); + e.equilibrate(s,XY); //} //catch (CanteraError) { //throw CanteraError("equilibrate", diff --git a/Cantera/src/converters/ck2ctml.cpp b/Cantera/src/converters/ck2ctml.cpp index 9b2df24c9..f73a0747e 100755 --- a/Cantera/src/converters/ck2ctml.cpp +++ b/Cantera/src/converters/ck2ctml.cpp @@ -498,7 +498,7 @@ namespace ctml { const char* tr_file, const char* out_file, const char* id_tag) { ckr::CKReader r; r.validate = true; - int i=1; + //int i=1; string infile = string(in_file); string dbfile = string(db_file); diff --git a/Cantera/src/oneD/Inlet1D.h b/Cantera/src/oneD/Inlet1D.h index 5e962435b..c588326a2 100644 --- a/Cantera/src/oneD/Inlet1D.h +++ b/Cantera/src/oneD/Inlet1D.h @@ -14,23 +14,44 @@ namespace Cantera { const int LeftInlet = 1; const int RightInlet = -1; - - // A class for surface domains in one-dimensional simulations, The - // surface is zero-dimensional, and defined by a set of surface - // species coverages. - + /** + * The base class for boundaries between one-dimensional spatial + * domains. The boundary may have its own internal variables, such + * as surface species coverages. + * + * The boundary types are an inlet, an outlet, a symmetry plane, + * and a surface. + * + * The public methods are all virtual, and the base class + * implementations throw exceptions. + */ class Bdry1D : public Resid1D { public: Bdry1D() : Resid1D(1, 1, 0.0) {} virtual ~Bdry1D() {} + + /// Initialize. virtual void init(){err("init");} + + /// Set the temperature. virtual void setTemperature(doublereal t){err("setTemperature");} + + /// Temperature [K]. virtual doublereal temperature() {err("temperature"); return 0.0;} + + /// Set the mole fractions by specifying a string. virtual void setMoleFractions(string xin){err("setMoleFractions");} + + /// Set the mole fractions by specifying an array. virtual void setMoleFractions(doublereal* xin){err("setMoleFractions");} + /// Mass fraction of species k. virtual doublereal massFraction(int k) {err("massFraction"); return 0.0;} + /// Set the total mass flow rate. virtual void setMdot(doublereal mdot){err("setMdot");} + + /// The total mass flow rate [kg/m2/s]. virtual doublereal mdot() {err("mdot"); return 0.0;} + protected: private: void err(string method) { @@ -56,6 +77,12 @@ namespace Cantera { needJacUpdate(); } + /// set spreading rate + virtual void setSpreadRate(doublereal V0) { + m_V0 = V0; + needJacUpdate(); + } + /// Temperature [K]. doublereal temperature() {return m_temp;} @@ -105,6 +132,8 @@ namespace Cantera { vector_fp atol(2, 1.e-5); setTolerances(2, rtol.begin(), 2, atol.begin()); + // if a flow domain is present on the left, then this must + // be a right inlet if (m_index > 0) { Resid1D& r = container().domain(m_index-1); if (r.domainType() == cFlowType) { @@ -130,6 +159,7 @@ namespace Cantera { throw CanteraError("Inlet1D::init", "An inlet domain must be connected to a flow domain."); } + // components = u, V, T, lambda, + mass fractions m_nsp = m_flow->nComponents() - 4; m_yin.resize(m_nsp, 0.0); if (m_xstr != "") @@ -149,31 +179,44 @@ namespace Cantera { doublereal* r = rg + loc(); integer* diag = diagg + loc(); doublereal *xb, *rb; - //integer *db = diag + loc(); + // residual equations for the two local variables r[0] = m_mdot - x[0]; r[1] = m_temp - x[1]; + + // both are algebraic constraints diag[0] = 0; diag[1] = 0; + // if it is a left inlet, then the flow solution vector + // starts 2 to the right in the global solution vector if (m_ilr == LeftInlet) { xb = x + 2; rb = r + 2; + + // If the energy equation is being solved, then + // the flow domain set this residual to T(0). + // Subtract the inlet temperature. if (m_flow->doEnergy(0)) { rb[2] -= x[1]; // T - //db[2] = 1; } - rb[3] += x[0]; // lambda + + // spreading rate. Flow domain sets this to V(0), + // so for finite spreading rate subtract m_V0. + rb[1] -= m_V0; + + rb[3] += x[0]; // lambda for (k = 0; k < m_nsp; k++) { rb[4+k] += x[0]*m_yin[k]; - //db[4+k] = 1; } - //cout << x[1] << " " << xb[2] << " " << rb[2] << endl; } + + // right inlet. else { int boffset = m_flow->nComponents(); xb = x - boffset; rb = r - boffset; + rb[1] -= m_V0; rb[2] -= x[1]; // T xb[0] += x[0]; // u for (k = 0; k < m_nsp; k++) @@ -192,7 +235,7 @@ namespace Cantera { protected: int m_ilr; - doublereal m_mdot, m_temp; + doublereal m_mdot, m_temp, m_V0; StFlow *m_flow; int m_nsp; vector_fp m_yin; diff --git a/README b/README index fc7775a0f..2b182c331 100755 --- a/README +++ b/README @@ -1,10 +1,12 @@ C A N T E R A - release 1.3.5 - 2/03 + release 1.4 + + 4/12/2003 + + Copyright (c) 2001-2003 California Institute of Technology - Copyright (c) 2001, 2002 California Institute of Technology License information @@ -18,18 +20,6 @@ holders. -Installing Cantera -================== - -To download and install Cantera, run Python script 'ctupdate.py.' -It will perform a binary install on Windows, and build everything from -the source on any other platform. - -Alternatively, to manually build Cantera, follow the procedure below. - - - - Building Cantera from the source code ===================================== @@ -68,34 +58,35 @@ export LD_LIBRARY_PATH=$HOME/my_cantera_dir/lib 2) Windows Build Procedure -------------------------- -Cantera can be built under Windows using Visual C++ and Compaq Visual -Fortran. In the 'win32' directory, open workspace 'cantera.dsw'. Set +Cantera can be built under Windows using Visual C++ 6.0 and Compaq Visual +Fortran 6.0. In the 'win32' directory, open workspace 'cantera.dsw'. Set the active project to 'examples', and the active configuration to 'Win32 - Release'. Build the project, and execute 'examples.exe' from the Build menu to verify that it works. If you plan to build the Python or MATLAB interfaces, you also need to build project 'ct'. This creates a DLL file which by default -is placed in C:\WINDOWS\SYSTEM32. Edit the project settings if you want +is placed in the Windows system directory. Edit the project settings if you want to put it somewhere else. -Finally, build project 'ctsetup'. This creates a simple utility that -writes a Visual Studio project file or a unix Makefile and a prototype -C++ main program that you can use as the starting point to develop -your own C++ application. - Configuring Matlab --------------------- -Before you can build the Matlab toolbox from the source, Matlab needs -to be configured for your compiler. In Matlab type: +The Matlab toolbox uses one compiled MEX program written in C++. +Before you can build it from the source, Matlab needs to be configured +for your compiler. In Matlab type: mex -setup and enter the number for the compiler you wish to use. +To build the MEX file needed for the Matlab toolbox, within Matlab +go to to the 'cantera' directory containing the toolbox and type +'buildux' on unix/linux/Mac OS X, or 'buildwin' on Windows. + + Configuring Python --------------------- @@ -105,4 +96,4 @@ have Python 2.0 or greater, you need to be able to write into its 'Lib/site-packages' directory, and the 'Numeric' package must be installed. If any of these are not the case, run the Python script 'ctupdate.py' found in the 'tools/bin' directory to download and -install Python and Numeric. +install Python and Numeric, or install them yourself. diff --git a/config/configure b/config/configure index 4b8c8f28e..028be8f9e 100755 --- a/config/configure +++ b/config/configure @@ -964,14 +964,15 @@ CANTERA_LIBDIR=$prefix/lib/cantera CANTERA_INCDIR=$prefix/include/cantera ctroot=`(cd ..;pwd)` +if test -z "$username"; then username=$USER; fi # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:970: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:971: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:974: checking build system type" >&5 +echo "$as_me:975: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -980,23 +981,23 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:983: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:984: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:987: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:988: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:992: result: $ac_cv_build" >&5 +echo "$as_me:993: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:999: checking host system type" >&5 +echo "$as_me:1000: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1005,19 +1006,19 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1008: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1009: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1013: result: $ac_cv_host" >&5 +echo "$as_me:1014: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1020: checking target system type" >&5 +echo "$as_me:1021: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1026,12 +1027,12 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1029: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1030: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1034: result: $ac_cv_target" >&5 +echo "$as_me:1035: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1253,7 +1254,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1256: checking for $ac_word" >&5 +echo "$as_me:1257: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1268,7 +1269,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -echo "$as_me:1271: found $ac_dir/$ac_word" >&5 +echo "$as_me:1272: found $ac_dir/$ac_word" >&5 break done @@ -1276,10 +1277,10 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:1279: result: $CXX" >&5 + echo "$as_me:1280: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:1282: result: no" >&5 + echo "$as_me:1283: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1292,7 +1293,7 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1295: checking for $ac_word" >&5 +echo "$as_me:1296: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1307,7 +1308,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CXX="$ac_prog" -echo "$as_me:1310: found $ac_dir/$ac_word" >&5 +echo "$as_me:1311: found $ac_dir/$ac_word" >&5 break done @@ -1315,10 +1316,10 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:1318: result: $ac_ct_CXX" >&5 + echo "$as_me:1319: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:1321: result: no" >&5 + echo "$as_me:1322: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1330,27 +1331,27 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" fi # Provide some information about the compiler. -echo "$as_me:1333:" \ +echo "$as_me:1334:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1336: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1337: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1339: \$? = $ac_status" >&5 + echo "$as_me:1340: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1341: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1342: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1344: \$? = $ac_status" >&5 + echo "$as_me:1345: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1346: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1347: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1349: \$? = $ac_status" >&5 + echo "$as_me:1350: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1353 "configure" +#line 1354 "configure" #include "confdefs.h" int @@ -1366,13 +1367,13 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1369: checking for C++ compiler default output" >&5 +echo "$as_me:1370: checking for C++ compiler default output" >&5 echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1372: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1373: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1375: \$? = $ac_status" >&5 + echo "$as_me:1376: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1395,34 +1396,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1398: error: C++ compiler cannot create executables" >&5 +{ { echo "$as_me:1399: error: C++ compiler cannot create executables" >&5 echo "$as_me: error: C++ compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1404: result: $ac_file" >&5 +echo "$as_me:1405: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1409: checking whether the C++ compiler works" >&5 +echo "$as_me:1410: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1415: \"$ac_try\"") >&5 + { (eval echo "$as_me:1416: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1418: \$? = $ac_status" >&5 + echo "$as_me:1419: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1425: error: cannot run C++ compiled programs. + { { echo "$as_me:1426: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1430,24 +1431,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1433: result: yes" >&5 +echo "$as_me:1434: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1440: checking whether we are cross compiling" >&5 +echo "$as_me:1441: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1442: result: $cross_compiling" >&5 +echo "$as_me:1443: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1445: checking for executable suffix" >&5 +echo "$as_me:1446: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1447: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1448: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1450: \$? = $ac_status" >&5 + echo "$as_me:1451: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1463,25 +1464,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1466: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1467: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1472: result: $ac_cv_exeext" >&5 +echo "$as_me:1473: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1478: checking for object suffix" >&5 +echo "$as_me:1479: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1484 "configure" +#line 1485 "configure" #include "confdefs.h" int @@ -1493,10 +1494,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1496: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1497: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1499: \$? = $ac_status" >&5 + echo "$as_me:1500: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1508,24 +1509,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1511: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1512: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1518: result: $ac_cv_objext" >&5 +echo "$as_me:1519: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1522: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:1523: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1528 "configure" +#line 1529 "configure" #include "confdefs.h" int @@ -1540,16 +1541,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1544: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1546: \$? = $ac_status" >&5 + echo "$as_me:1547: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1549: \"$ac_try\"") >&5 + { (eval echo "$as_me:1550: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1552: \$? = $ac_status" >&5 + echo "$as_me:1553: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1561,19 +1562,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1564: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:1565: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" -echo "$as_me:1570: checking whether $CXX accepts -g" >&5 +echo "$as_me:1571: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1576 "configure" +#line 1577 "configure" #include "confdefs.h" int @@ -1585,16 +1586,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1588: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1591: \$? = $ac_status" >&5 + echo "$as_me:1592: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1594: \"$ac_try\"") >&5 + { (eval echo "$as_me:1595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1597: \$? = $ac_status" >&5 + echo "$as_me:1598: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else @@ -1604,7 +1605,7 @@ ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1607: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:1608: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -1631,7 +1632,7 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1634 "configure" +#line 1635 "configure" #include "confdefs.h" #include $ac_declaration @@ -1644,16 +1645,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1647: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1648: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1650: \$? = $ac_status" >&5 + echo "$as_me:1651: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1653: \"$ac_try\"") >&5 + { (eval echo "$as_me:1654: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1656: \$? = $ac_status" >&5 + echo "$as_me:1657: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1663,7 +1664,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1666 "configure" +#line 1667 "configure" #include "confdefs.h" $ac_declaration int @@ -1675,16 +1676,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1678: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1679: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1681: \$? = $ac_status" >&5 + echo "$as_me:1682: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1684: \"$ac_try\"") >&5 + { (eval echo "$as_me:1685: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1687: \$? = $ac_status" >&5 + echo "$as_me:1688: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1714,7 +1715,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1717: checking for $ac_word" >&5 +echo "$as_me:1718: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1729,7 +1730,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1732: found $ac_dir/$ac_word" >&5 +echo "$as_me:1733: found $ac_dir/$ac_word" >&5 break done @@ -1737,10 +1738,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1740: result: $CC" >&5 + echo "$as_me:1741: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1743: result: no" >&5 + echo "$as_me:1744: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1749,7 +1750,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1752: checking for $ac_word" >&5 +echo "$as_me:1753: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1764,7 +1765,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1767: found $ac_dir/$ac_word" >&5 +echo "$as_me:1768: found $ac_dir/$ac_word" >&5 break done @@ -1772,10 +1773,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1775: result: $ac_ct_CC" >&5 + echo "$as_me:1776: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1778: result: no" >&5 + echo "$as_me:1779: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1788,7 +1789,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1791: checking for $ac_word" >&5 +echo "$as_me:1792: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1803,7 +1804,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1806: found $ac_dir/$ac_word" >&5 +echo "$as_me:1807: found $ac_dir/$ac_word" >&5 break done @@ -1811,10 +1812,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1814: result: $CC" >&5 + echo "$as_me:1815: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1817: result: no" >&5 + echo "$as_me:1818: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1823,7 +1824,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1826: checking for $ac_word" >&5 +echo "$as_me:1827: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1838,7 +1839,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1841: found $ac_dir/$ac_word" >&5 +echo "$as_me:1842: found $ac_dir/$ac_word" >&5 break done @@ -1846,10 +1847,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1849: result: $ac_ct_CC" >&5 + echo "$as_me:1850: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1852: result: no" >&5 + echo "$as_me:1853: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1862,7 +1863,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1865: checking for $ac_word" >&5 +echo "$as_me:1866: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1882,7 +1883,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then continue fi ac_cv_prog_CC="cc" -echo "$as_me:1885: found $ac_dir/$ac_word" >&5 +echo "$as_me:1886: found $ac_dir/$ac_word" >&5 break done @@ -1904,10 +1905,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1907: result: $CC" >&5 + echo "$as_me:1908: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1910: result: no" >&5 + echo "$as_me:1911: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1918,7 +1919,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1921: checking for $ac_word" >&5 +echo "$as_me:1922: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1933,7 +1934,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1936: found $ac_dir/$ac_word" >&5 +echo "$as_me:1937: found $ac_dir/$ac_word" >&5 break done @@ -1941,10 +1942,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1944: result: $CC" >&5 + echo "$as_me:1945: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1947: result: no" >&5 + echo "$as_me:1948: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1957,7 +1958,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1960: checking for $ac_word" >&5 +echo "$as_me:1961: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1972,7 +1973,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1975: found $ac_dir/$ac_word" >&5 +echo "$as_me:1976: found $ac_dir/$ac_word" >&5 break done @@ -1980,10 +1981,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1983: result: $ac_ct_CC" >&5 + echo "$as_me:1984: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1986: result: no" >&5 + echo "$as_me:1987: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1995,37 +1996,37 @@ fi fi -test -z "$CC" && { { echo "$as_me:1998: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1999: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:2003:" \ +echo "$as_me:2004:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:2006: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:2007: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:2009: \$? = $ac_status" >&5 + echo "$as_me:2010: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2011: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:2012: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:2014: \$? = $ac_status" >&5 + echo "$as_me:2015: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2016: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:2017: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:2019: \$? = $ac_status" >&5 + echo "$as_me:2020: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:2022: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:2023: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2028 "configure" +#line 2029 "configure" #include "confdefs.h" int @@ -2040,16 +2041,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2043: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2044: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2046: \$? = $ac_status" >&5 + echo "$as_me:2047: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2049: \"$ac_try\"") >&5 + { (eval echo "$as_me:2050: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2052: \$? = $ac_status" >&5 + echo "$as_me:2053: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -2061,19 +2062,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:2064: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:2065: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:2070: checking whether $CC accepts -g" >&5 +echo "$as_me:2071: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2076 "configure" +#line 2077 "configure" #include "confdefs.h" int @@ -2085,16 +2086,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2088: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2089: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2091: \$? = $ac_status" >&5 + echo "$as_me:2092: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2094: \"$ac_try\"") >&5 + { (eval echo "$as_me:2095: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2097: \$? = $ac_status" >&5 + echo "$as_me:2098: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -2104,7 +2105,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2107: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:2108: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -2131,16 +2132,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2134: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2135: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2137: \$? = $ac_status" >&5 + echo "$as_me:2138: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2140: \"$ac_try\"") >&5 + { (eval echo "$as_me:2141: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2143: \$? = $ac_status" >&5 + echo "$as_me:2144: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -2152,7 +2153,7 @@ if { (eval echo "$as_me:2134: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 2155 "configure" +#line 2156 "configure" #include "confdefs.h" #include $ac_declaration @@ -2165,16 +2166,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2169: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2171: \$? = $ac_status" >&5 + echo "$as_me:2172: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2174: \"$ac_try\"") >&5 + { (eval echo "$as_me:2175: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2177: \$? = $ac_status" >&5 + echo "$as_me:2178: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2184,7 +2185,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 2187 "configure" +#line 2188 "configure" #include "confdefs.h" $ac_declaration int @@ -2196,16 +2197,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2199: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2200: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2202: \$? = $ac_status" >&5 + echo "$as_me:2203: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2205: \"$ac_try\"") >&5 + { (eval echo "$as_me:2206: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2208: \$? = $ac_status" >&5 + echo "$as_me:2209: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -2244,7 +2245,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2247: checking for a BSD compatible install" >&5 +echo "$as_me:2248: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2293,7 +2294,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2296: result: $INSTALL" >&5 +echo "$as_me:2297: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2317,7 +2318,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:2320: checking for $ac_word" >&5 +echo "$as_me:2321: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2332,7 +2333,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_F77="$ac_tool_prefix$ac_prog" -echo "$as_me:2335: found $ac_dir/$ac_word" >&5 +echo "$as_me:2336: found $ac_dir/$ac_word" >&5 break done @@ -2340,10 +2341,10 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - echo "$as_me:2343: result: $F77" >&5 + echo "$as_me:2344: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else - echo "$as_me:2346: result: no" >&5 + echo "$as_me:2347: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2356,7 +2357,7 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2359: checking for $ac_word" >&5 +echo "$as_me:2360: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2371,7 +2372,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_F77="$ac_prog" -echo "$as_me:2374: found $ac_dir/$ac_word" >&5 +echo "$as_me:2375: found $ac_dir/$ac_word" >&5 break done @@ -2379,10 +2380,10 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - echo "$as_me:2382: result: $ac_ct_F77" >&5 + echo "$as_me:2383: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else - echo "$as_me:2385: result: no" >&5 + echo "$as_me:2386: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2393,30 +2394,30 @@ done fi # Provide some information about the compiler. -echo "$as_me:2396:" \ +echo "$as_me:2397:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:2399: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:2400: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:2402: \$? = $ac_status" >&5 + echo "$as_me:2403: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2404: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:2405: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:2407: \$? = $ac_status" >&5 + echo "$as_me:2408: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2409: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:2410: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:2412: \$? = $ac_status" >&5 + echo "$as_me:2413: \$? = $ac_status" >&5 (exit $ac_status); } # If we don't use `.F' as extension, the preprocessor is not run on the # input file. ac_save_ext=$ac_ext ac_ext=F -echo "$as_me:2419: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo "$as_me:2420: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2430,16 +2431,16 @@ else end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2433: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2434: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2436: \$? = $ac_status" >&5 + echo "$as_me:2437: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2439: \"$ac_try\"") >&5 + { (eval echo "$as_me:2440: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2442: \$? = $ac_status" >&5 + echo "$as_me:2443: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -2451,14 +2452,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:2454: result: $ac_cv_f77_compiler_gnu" >&5 +echo "$as_me:2455: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -echo "$as_me:2461: checking whether $F77 accepts -g" >&5 +echo "$as_me:2462: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2470,16 +2471,16 @@ cat >conftest.$ac_ext <<_ACEOF end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2473: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2474: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2476: \$? = $ac_status" >&5 + echo "$as_me:2477: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2479: \"$ac_try\"") >&5 + { (eval echo "$as_me:2480: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2482: \$? = $ac_status" >&5 + echo "$as_me:2483: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else @@ -2490,7 +2491,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2493: result: $ac_cv_prog_f77_g" >&5 +echo "$as_me:2494: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS @@ -2526,7 +2527,7 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -echo "$as_me:2529: checking how to get verbose linking output from $F77" >&5 +echo "$as_me:2530: checking how to get verbose linking output from $F77" >&5 echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 if test "${ac_cv_prog_f77_v+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2538,16 +2539,16 @@ cat >conftest.$ac_ext <<_ACEOF end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2541: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2542: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2544: \$? = $ac_status" >&5 + echo "$as_me:2545: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2547: \"$ac_try\"") >&5 + { (eval echo "$as_me:2548: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2550: \$? = $ac_status" >&5 + echo "$as_me:2551: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_v= # Try some options frequently used verbose output @@ -2569,7 +2570,7 @@ _ACEOF # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" -(eval echo $as_me:2572: \"$ac_link\") >&5 +(eval echo $as_me:2573: \"$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 @@ -2601,21 +2602,21 @@ fi done done if test -z "$ac_cv_prog_f77_v"; then - { echo "$as_me:2604: WARNING: cannot determine how to obtain linking information from $F77" >&5 + { echo "$as_me:2605: WARNING: cannot determine how to obtain linking information from $F77" >&5 echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ echo "$as_me:2610: WARNING: compilation failed" >&5 +{ echo "$as_me:2611: WARNING: compilation failed" >&5 echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2616: result: $ac_cv_prog_f77_v" >&5 +echo "$as_me:2617: result: $ac_cv_prog_f77_v" >&5 echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 -echo "$as_me:2618: checking for Fortran 77 libraries" >&5 +echo "$as_me:2619: checking for Fortran 77 libraries" >&5 echo $ECHO_N "checking for Fortran 77 libraries... $ECHO_C" >&6 if test "${ac_cv_flibs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2641,7 +2642,7 @@ _ACEOF # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" -(eval echo $as_me:2644: \"$ac_link\") >&5 +(eval echo $as_me:2645: \"$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 @@ -2796,7 +2797,7 @@ esac fi # test "x$FLIBS" = "x" fi -echo "$as_me:2799: result: $ac_cv_flibs" >&5 +echo "$as_me:2800: result: $ac_cv_flibs" >&5 echo "${ECHO_T}$ac_cv_flibs" >&6 FLIBS="$ac_cv_flibs" @@ -2863,7 +2864,7 @@ fi # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -echo "$as_me:2866: checking SO" >&5 +echo "$as_me:2867: checking SO" >&5 echo $ECHO_N "checking SO... $ECHO_C" >&6 if test -z "$SO" then @@ -2874,7 +2875,7 @@ then *) SO=.so;; esac fi -echo "$as_me:2877: result: $SO" >&5 +echo "$as_me:2878: result: $SO" >&5 echo "${ECHO_T}$SO" >&6 ac_ext=cc @@ -2909,7 +2910,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:2912: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:2913: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -3082,7 +3083,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:3085: error: ambiguous option: $1 + { { echo "$as_me:3086: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -3101,7 +3102,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:3104: error: unrecognized option: $1 + -*) { { echo "$as_me:3105: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -3166,7 +3167,7 @@ do "../test_problems/cxx_ex/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/cxx_ex/Makefile" ;; "../test_problems/silane_equil/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/silane_equil/Makefile" ;; "../config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ../config.h" ;; - *) { { echo "$as_me:3169: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:3170: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -3247,6 +3248,7 @@ s,@ECHO_T@,$ECHO_T,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t +s,@username@,$username,;t t s,@ctroot@,$ctroot,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t @@ -3435,7 +3437,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:3438: creating $ac_file" >&5 + { echo "$as_me:3440: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -3453,7 +3455,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:3456: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:3458: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -3466,7 +3468,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:3469: error: cannot find input file: $f" >&5 + { { echo "$as_me:3471: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -3527,7 +3529,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:3530: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:3532: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -3538,7 +3540,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:3541: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:3543: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -3551,7 +3553,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:3554: error: cannot find input file: $f" >&5 + { { echo "$as_me:3556: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -3668,7 +3670,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:3671: $ac_file is unchanged" >&5 + { echo "$as_me:3673: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/config/configure.in b/config/configure.in index 33e218ed2..c9d613d74 100755 --- a/config/configure.in +++ b/config/configure.in @@ -20,6 +20,9 @@ CANTERA_LIBDIR=$prefix/lib/cantera CANTERA_INCDIR=$prefix/include/cantera ctroot=`(cd ..;pwd)` +if test -z "$username"; then username=$USER; fi +AC_SUBST(username) + AC_SUBST(ctroot) diff --git a/tools/Makefile.in b/tools/Makefile.in index 32c8b48e0..023163330 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -5,6 +5,8 @@ # all: kernel +install: templates-install + kernel: cd src; @MAKE@ cd testtools; @MAKE@ @@ -20,3 +22,11 @@ docs: depends: cd src; @MAKE@ depends cd testtools; @MAKE@ depends + +templates-install: + @INSTALL@ -d @prefix@/cantera/templates + @INSTALL@ -d @prefix@/cantera/templates/f77 + @INSTALL@ -m 644 templates/f77/*.cpp @prefix@/cantera/templates/f77 + @INSTALL@ -m 644 templates/f77/*.f @prefix@/cantera/templates/f77 + @INSTALL@ -m 644 templates/f77/*.mak @prefix@/cantera/templates/f77 + chown -R @username@ @prefix@/cantera/templates \ No newline at end of file diff --git a/tools/templates/f77/demo.f b/tools/templates/f77/demo.f index 11f530631..bd788a03a 100644 --- a/tools/templates/f77/demo.f +++ b/tools/templates/f77/demo.f @@ -6,18 +6,42 @@ c program demo implicit double precision (a-h,o-z) parameter (MAXSP = 20, MAXRXNS = 100) - double precision x(MAXSP), y(MAXSP), wdot(MAXRXNS) + double precision q(MAXRXNS), qf(MAXRXNS), qr(MAXRXNS) + double precision x(MAXSP), y(MAXSP), wdot(MAXSP) + character*80 eq c - call readmechanism('h2o2.xml','') + call newIdealGasMix('h2o2.xml','') t = 1200.0 p = 101325.0 - call setState_TPX_String(t, p, 'H2:2, O2:1') - write(*,*) ' **** Test Program ****' + call setState_TPX_String(t, p, + $ 'H2:2, O2:1, OH:0.01, H:0.01, O:0.01') + call equilibrate('HP') + + write(*,*) '**** Fortran 77 Test Program ****' + + write(*,10) temperature(), pressure(), density(), $ enthalpy_mole(), entropy_mole(), cp_mole() - 10 format(//'Temperature:',g14.5,' K'/'Pressure:',g14.5,' Pa' - $ /'Density:',g14.5,' kg/m**3'//) + 10 format(//'Temperature: ',g14.5,' K'/ + $ 'Pressure: ',g14.5,' Pa'/ + $ 'Density: ',g14.5,' kg/m3'/ + $ 'Molar Enthalpy:',g14.5,' J/kmol'/ + $ 'Molar Entropy: ',g14.5,' J/kmol-K'/ + $ 'Molar cp: ',g14.5,' J/kmol-K'//) + + c +c Reaction information +c + irxns = nReactions() + call getFwdRatesOfProgress(qf) + call getRevRatesOfProgress(qr) + call getNetRatesOfProgress(q) + do i = 1,irxns + call getReactionEqn(i,eq) + write(*,20) eq,qf(i),qr(i),q(i) + 20 format(a20,3g14.5,' kmol/m3/s') + end do stop end diff --git a/tools/templates/f77/demo_ftnlib.cpp b/tools/templates/f77/demo_ftnlib.cpp index 5a92c43c5..50d8a249e 100644 --- a/tools/templates/f77/demo_ftnlib.cpp +++ b/tools/templates/f77/demo_ftnlib.cpp @@ -10,6 +10,8 @@ properties and kinetic rates for reacting ideal gas mixtures. Only a single pointer to an IdealGasMix object is stored, so only one reaction mechanism may be used at any one time in the application. + Of course, it is a simple modification to store multiple objects if + it is desired to use multiple reaction mechanisms. The functions defined here are ones commonly needed in application programs that simulate gas-phase combustion or similar processes. @@ -19,25 +21,41 @@ examples in the demos/f77 subdirectory within the directory where Cantera is installed. + Note that this library is not an "official" Cantera Fortran 77 + interface, only an example. If you use it with your Fortran 77 + application and want your application to be portable to other + machines running Cantera, include this file along with your source + code. + */ // add any other Cantera header files you need here #include "IdealGasMix.h" #include "equilibrium.h" - // store a pointer to an IdealGasMix object. The object itself will // be created by the call to init_. static IdealGasMix* _gas = 0; +map _equil_opt; +static void _init() { + _equil_opt["TP"] = TP; + _equil_opt["TV"] = TV; + _equil_opt["HP"] = HP; + _equil_opt["UV"] = UV; + _equil_opt["SP"] = SP; + _equil_opt["SV"] = SV; +} + +// extern "C" turns off C++ name-mangling, so that the procedure names +// in the object file are exactly as shown here. extern "C" { /// This is the Fortran main program extern int MAIN__(); - /** * Read in a reaction mechanism file and create an IdealGasMix * object. The file may be in Chemkin-compatible format or in @@ -45,12 +63,13 @@ extern "C" { * second argument. If none is required, enter an empty string as * the second argument. */ - void readmechanism_(char* file, char* thermo, + void newidealgasmix_(char* file, char* thermo, ftnlen lenfile, ftnlen lenthermo) { string fin = string(file, lenfile); string fth = string(thermo, lenthermo); if (_gas) delete _gas; _gas = new IdealGasMix(fin, fth); + _init(); } /// integer function nElements() @@ -70,12 +89,15 @@ extern "C" { _gas->setState_TPX(*T, *P, X); } - /// subroutine setState_TPX_AsString(T, P, X) - void setstate_tpx_asstring_(doublereal* T, doublereal* P, + /// subroutine setState_TPX_String(T, P, X) + void setstate_tpx_string_(doublereal* T, doublereal* P, char* X, ftnlen lenx) { _gas->setState_TPX(*T, *P, string(X, lenx)); } + void setstate_try_(doublereal* T, doublereal* rho, doublereal* Y) { + _gas->setState_TRY(*T, *rho, Y); + } //-------------- thermodynamic properties ---------------------- @@ -143,11 +165,14 @@ extern "C" { doublereal gibbs_mass_() { return _gas->gibbs_mole(); } - - void equilibrate_(integer* opt) { - int option = *opt; - equilibrate(*_gas, option); + void equilibrate_(char* opt, ftnlen lenopt) { + if (lenopt != 2) { + throw CanteraError("equilibrate", + "two-character string required."); + } + string optstr = string(opt, 2); + equilibrate(*_gas, _equil_opt[optstr]); } @@ -157,7 +182,8 @@ extern "C" { int irxn = *i - 1; fill(eqn, eqn + n, ' '); string e = _gas->reactionString(irxn); - unsigned int nmx = (e.size() > n ? n : e.size()); + int ns = e.size(); + unsigned int nmx = (ns > n ? n : ns); copy(e.begin(), e.begin()+nmx, eqn); } @@ -165,9 +191,26 @@ extern "C" { _gas->getNetProductionRates(wdot); } + void getcreationrates_(doublereal* cdot) { + _gas->getCreationRates(cdot); + } + + void getdestructionrates_(doublereal* ddot) { + _gas->getDestructionRates(ddot); + } + void getnetratesofprogress_(doublereal* q) { _gas->getNetRatesOfProgress(q); } + + void getfwdratesofprogress_(doublereal* q) { + _gas->getFwdRatesOfProgress(q); + } + + void getrevratesofprogress_(doublereal* q) { + _gas->getRevRatesOfProgress(q); + } + }