*** empty log message ***

This commit is contained in:
Dave Goodwin 2006-07-11 16:07:46 +00:00
parent 660e5a7812
commit ca65c77427
14 changed files with 2010 additions and 1197 deletions

View file

@ -1375,28 +1375,6 @@ class stoichiometric_liquid(stoichiometric_solid):
species, density, transport,
initial_state, options)
## class pure_solid(stoichiometric_solid):
## """Deprecated. Use stoichiometric_solid"""
## def __init__(self,
## name = '',
## elements = '',
## species = '',
## density = -1.0,
## transport = 'None',
## initial_state = None,
## options = []):
## stoichiometric_solid.__init__(self, name, 3, elements,
## species, 'none',
## initial_state, options)
## self._dens = density
## self._pure = 1
## if self._dens < 0.0:
## raise CTI_Error('density must be specified.')
## self._tr = transport
## print 'WARNING: entry type pure_solid is deprecated.'
## print 'Use stoichiometric_solid instead.'
class metal(phase):
"""A metal."""
@ -1464,30 +1442,44 @@ class incompressible_solid(phase):
k['model'] = 'none'
class lattice:
def __init__(self, name = '', site_density = -1.0,
class lattice(phase):
def __init__(self, name = '',
elements = '',
species = '',
reactions = 'none',
transport = 'None',
initial_state = None,
options = [],
site_density = -1.0,
vacancy_species = ''):
self._name = name
phase.__init__(self, name, 3, elements, species, 'none',
initial_state, options)
self._tr = transport
self._n = site_density
self._vac = vacancy_species
self._species = species
if name == '':
raise CTI_Error('sublattice name must be specified')
if species == '':
raise CTI_Error('sublattice species must be specified')
if site_density < 0.0:
raise CTI_Error('sublattice '+name
+' site density must be specified')
if species == '':
raise CTI_Error('sublattice '+name
+' species must be specified')
def build(self,p):
lat = p.addChild('Lattice')
lat['name'] = self._name
addFloat(lat, 'site_density', self._n, defunits = _umol+'/'+_ulen+'3')
if self._vac:
lat.addChild('vacancy_species',self._vac)
lat.addChild('species',self._species)
def build(self,p, visible = 0):
#if visible == 0:
# return
ph = phase.build(self, p)
e = ph.addChild('thermo')
e['model'] = 'Lattice'
addFloat(e, 'site_density', self._n, defunits = _umol+'/'+_ulen+'3')
if self._vac:
e.addChild('vacancy_species',self._vac)
if self._tr:
t = ph.addChild('transport')
t['model'] = self._tr
k = ph.addChild("kinetics")
k['model'] = 'none'
class lattice_solid(phase):
"""A solid crystal consisting of one or more sublattices."""
@ -1499,6 +1491,27 @@ class lattice_solid(phase):
transport = 'None',
initial_state = None,
options = []):
# find elements
elist = []
for lat in lattices:
e = lat._el.split()
for el in e:
if not el in elist:
elist.append(el)
elements = string.join(elist)
# find species
slist = []
for lat in lattices:
_sp = ""
for spp in lat._species:
_sp = _sp + spp
s = _sp.split()
for sp in s:
if not sp in slist:
slist.append(sp)
species = string.join(slist)
phase.__init__(self, name, 3, elements, species, 'none',
initial_state, options)
@ -1519,7 +1532,7 @@ class lattice_solid(phase):
if self._lattices:
lat = e.addChild('LatticeArray')
for n in self._lattices:
n.build(lat)
n.build(lat, visible = 1)
if self._tr:
t = ph.addChild('transport')
@ -1693,3 +1706,4 @@ if __name__ == "__main__":
execfile(file)
write()

View file

@ -11,7 +11,7 @@
#include <iostream>
using namespace std;
#define OLD_SUNDIALS
#undef OLD_SUNDIALS
// sundials includes
#ifdef OLD_SUNDIALS
@ -31,6 +31,7 @@ using namespace std;
#include <cvodes_dense.h>
#include <cvodes_diag.h>
#include <cvodes_spgmr.h>
#include <cvodes_band.h>
//#include <nvector.h>
#include <nvector_serial.h>
#endif
@ -65,7 +66,7 @@ extern "C" {
* desired equations.
* @ingroup odeGroup
*/
static void cvodes_rhs(realtype t, N_Vector y, N_Vector ydot,
static int cvodes_rhs(realtype t, N_Vector y, N_Vector ydot,
void *f_data) {
double* ydata = NV_DATA_S(y); //N_VDATA(y);
double* ydotdata = NV_DATA_S(ydot); //N_VDATA(ydot);
@ -81,6 +82,7 @@ extern "C" {
//Cantera::showErrors();
//Cantera::error("Teminating execution");
//}
return 0;
}
}
@ -211,6 +213,7 @@ namespace Cantera {
m_np = func.nparams();
long int nv = func.neq();
#ifdef OLD_SUNDIALS
doublereal* data;
int n, j;
m_yS = N_VNewVectorArray_Serial(m_np, nv);
@ -220,6 +223,19 @@ namespace Cantera {
data[j] =0.0;
}
}
#else
doublereal* data;
int n, j;
N_Vector y;
y = N_VNew_Serial(nv);
m_yS = N_VCloneVectorArray_Serial(m_np, y);
for (n = 0; n < m_np; n++) {
data = NV_DATA_S(m_yS[n]);
for (j = 0; j < nv; j++) {
data[j] =0.0;
}
}
#endif
int flag;
flag = CVodeSensMalloc(m_cvode_mem, m_np, CV_STAGGERED, m_yS);
if (flag != CV_SUCCESS)
@ -247,7 +263,7 @@ namespace Cantera {
func.getInitialConditions(m_t0, m_neq, NV_DATA_S(nv(m_y)));
if (m_cvode_mem) CVodeFree(m_cvode_mem);
if (m_cvode_mem) CVodeFree(&m_cvode_mem);
m_cvode_mem = CVodeCreate(m_method, m_iter);
if (!m_cvode_mem) throw CVodesErr("CVodeCreate failed.");

View file

@ -19,72 +19,86 @@
namespace Cantera {
/**
* A rate coefficient of the form
* \f[
* A T^b \exp (-E/RT)
* \f]
*/
class Arrhenius {
class Arrhenius {
public:
static int type(){ return ARRHENIUS; }
Arrhenius() :
m_logA(-1.0E300),
m_b (0.0),
m_E (0.0),
m_A(0.0)
{
}
Arrhenius(int csize, const doublereal* c) :
m_b (c[1]),
m_E (c[2]),
m_A (c[0])
{
if (m_A <= 0.0) {
m_logA = -1.0E300;
} else {
m_logA = log(m_A);
}
}
Arrhenius(doublereal A, doublereal b, doublereal E) :
m_b (b),
m_E (E),
m_A (A)
{
if (m_A <= 0.0) {
m_logA = -1.0E300;
} else {
m_logA = log(m_A);
}
}
void update_C(const doublereal* c) {}
public:
/**
* Update the value of the logarithm of the rate constant.
*
* Note, this function should never be called for negative A values.
* If it does then it will produce a negative overflow result, and
* a zero net forwards reaction rate, instead of a negative reaction
* rate constant that is the expected result.
*/
doublereal update(doublereal logT, doublereal recipT) const {
return m_logA + m_b*logT - m_E*recipT;
}
/// return the rate coefficient type.
static int type(){ return ARRHENIUS; }
/**
* Update the value the rate constant.
*
* This function returns the actual value of the rate constant.
* It can be safely called for negative values of the pre-exponential
* factor.
*/
doublereal updateRC(doublereal logT, doublereal recipT) const {
return m_A * exp(m_b*logT - m_E*recipT);
}
/// Default constructor.
Arrhenius() :
m_logA(-1.0E300),
m_b (0.0),
m_E (0.0),
m_A(0.0) {}
/// Constructor with Arrhenius parameters specified with an array.
Arrhenius(int csize, const doublereal* c) :
m_b (c[1]),
m_E (c[2]),
m_A (c[0])
{
if (m_A <= 0.0) {
m_logA = -1.0E300;
} else {
m_logA = log(m_A);
}
}
/// Constructor.
/// @param A pre-exponential. The unit system is
/// (kmol, m, s). The actual units depend on the reaction
/// order and the dimensionality (surface or bulk).
/// @param b Temperature exponent. Non-dimensional.
/// @param E Activation energy in temperature units. Kelvin.
Arrhenius(doublereal A, doublereal b, doublereal E) :
m_b (b),
m_E (E),
m_A (A)
{
if (m_A <= 0.0) {
m_logA = -1.0E300;
} else {
m_logA = log(m_A);
}
}
/// Update concentration-dependent parts of the rate
/// coefficient. For this class, there are no
/// concentration-dependent parts, so this method does
/// nothing.
void update_C(const doublereal* c) {}
/**
* Update the value of the logarithm of the rate constant.
*
* Note, this function should never be called for negative A values.
* If it does then it will produce a negative overflow result, and
* a zero net forwards reaction rate, instead of a negative reaction
* rate constant that is the expected result.
*/
doublereal update(doublereal logT, doublereal recipT) const {
return m_logA + m_b*logT - m_E*recipT;
}
/**
* Update the value the rate constant.
*
* This function returns the actual value of the rate constant.
* It can be safely called for negative values of the pre-exponential
* factor.
*/
doublereal updateRC(doublereal logT, doublereal recipT) const {
return m_A * exp(m_b*logT - m_E*recipT);
}
/// no longer used
//doublereal update_dT(doublereal logT, doublereal recipT) const {
// return recipT*(m_b + m_E*recipT);
//}
void writeUpdateRHS(ostream& s) const {
s << " exp(" << m_logA;
@ -131,10 +145,6 @@ namespace Cantera {
f = m_terms[n].updateRC(logT, recipT);
fsum += f;
}
//if (fsum <= 0.0) {
// throw CanteraError("ArrheniusSum::update",
// "Error: negative total reaction rate");
//}
return log(fsum);
}
@ -152,52 +162,40 @@ namespace Cantera {
f = m_terms[n].updateRC(logT, recipT);
fsum += f;
}
//if (fsum <= 0.0) {
// throw CanteraError("ArrheniusSum::update",
// "Error: negative total reaction rate");
//}
return fsum;
}
// doublereal update_dT(doublereal logT, doublereal recipT) const {
// throw CanteraError("ArrheniusSum::update_dT","not implemented.");
//}
void writeUpdateRHS(ostream& s) const {
;
}
//doublereal activationEnergy_R() const {
// return m_E;
//}
static bool alwaysComputeRate() { return true;}
protected:
vector<Arrhenius> m_terms;
int m_nterms;
vector<Arrhenius> m_terms;
int m_nterms;
};
/**
* An Arrhenius rate with coverage-dependent terms.
*/
class SurfaceArrhenius {
public:
static int type(){ return ARRHENIUS; }
SurfaceArrhenius() :
m_logA(-1.0E300),
m_b (0.0),
m_E (0.0),
m_A(0.0),
m_acov(0.0),
m_ecov(0.0),
m_mcov(0.0),
m_ncov(0),
m_nmcov(0)
{
}
/**
* An Arrhenius rate with coverage-dependent terms.
*/
class SurfaceArrhenius {
public:
static int type(){ return ARRHENIUS; }
SurfaceArrhenius() :
m_logA(-1.0E300),
m_b (0.0),
m_E (0.0),
m_A(0.0),
m_acov(0.0),
m_ecov(0.0),
m_mcov(0.0),
m_ncov(0),
m_nmcov(0)
{
}
SurfaceArrhenius( int csize, const doublereal* c ) :
m_b (c[1]),

View file

@ -763,6 +763,7 @@ namespace Cantera {
// set the id attribute of the phase to the 'id' attribute
// in the XML tree.
th->setID(phase.id());
th->setName(phase.id());
// Number of spatial dimensions. Defaults to 3 (bulk phase)
if (phase.hasAttrib("dim")) {

2750
ChangeLog

File diff suppressed because it is too large Load diff

View file

@ -151,6 +151,9 @@ ifeq ($(build_python),2)
@INSTALL@ Cantera/python/examples/$${exdir}/*.py \
@ct_demodir@/python/$${exdir} ; \
done)
@INSTALL@ Cantera/python/examples/flames/*.dat \
@ct_demodir@/python/flames ; \
# @INSTALL@ -d @ct_demodir@/python
# @INSTALL@ -d @ct_demodir@/python/equilibrium
# @INSTALL@ Cantera/python/examples/equilibrium/*.py \

View file

@ -8,10 +8,10 @@
Copyright (c) 2001-2005 California Institute of Technology
***************************************************************
*** ***
*** For information on installing and using Cantera, see ***
*** http://www.cantera.org/Documentation ***
*** ***
***
*** For information on installing and using Cantera, see
*** http://www.cantera.org/Documentation
***
***************************************************************
License information
@ -28,7 +28,7 @@ Web sites
==========
The main Cantera web site is http://www.cantera.org. This serves as a
gateway to the other two web sites:
gateway to three other web sites:
1. The Cantera User's Group. http://groups.yahoo.com/groups/cantera.
This site has a message board, and some miscellaneous files and utilities.
@ -36,3 +36,5 @@ gateway to the other two web sites:
2. The Cantera Sourceforge site. Distribution of the Cantera source code is
done using Sourceforge. The site is http://sourceforge.net/projects/cantera.
3. The Cantera wiki. http://www.cantera.org/wiki.

View file

@ -1,13 +1,10 @@
#!/bin/csh
#!/bin/sh
#
# Test whether $1 has a modification time
# greater than $2
#
test $1 -nt $2
set tres = $status
# echo "tres = " $tres
if ( $tres == "0" ) then
if test $1 -nt $2 ; then
exit 0
endif
# echo we are here
fi
#echo we are here
exit 1

45
configure vendored
View file

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
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 BITCOMPILE BITHARDWARE BITCHANGE ldemulationarg CVF_LIBDIR USE_CLIB_DLL local_inst local_python_inst python_prefix python_win_prefix ctversion homedir ct_libdir ct_bindir ct_incdir ct_incroot ct_datadir ct_demodir ct_templdir ct_tutdir ct_docdir ct_dir ct_mandir 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 GRAPHVIZDIR ARCHIVE DO_RANLIB RANLIB USERDIR INCL_USER_CODE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT use_sundials CVODE_LIBS sundials_include CANTERA_DEBUG_MODE phase_object_files phase_header_files COMPILE_IDEAL_SOLUTIONS COMPILE_ELECTROLYTES NEED_CATHERMO WITH_REACTORS KERNEL KERNEL_OBJ BUILD_CK LIB_DIR build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_DIR build_with_f2c build_f2c_lib LOCAL_LIB_DIRS LOCAL_LIBS CT_SHARED_LIB PYTHON_CMD BUILD_PYTHON NUMARRAY_INC_DIR NUMARRAY_HOME CANTERA_PYTHON_HOME CVSTAG MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX CXXFLAGS ac_ct_CXX CPP EGREP SOEXT SHARED PIC CXX_INCLUDES LCXX_FLAGS LCXX_END_LIBS HAVE_STRIPSYMBOLS F77 FFLAGS ac_ct_F77 FLIBS F90 BUILD_F90 F90FLAGS F90BUILDFLAGS 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 math_libs SO LDSHARED EXTRA_LINK TSCOMPARE_abs INSTALL_abs 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 BITCOMPILE BITHARDWARE BITCHANGE ldemulationarg CVF_LIBDIR USE_CLIB_DLL local_inst local_python_inst python_prefix python_win_prefix ctversion homedir ct_libdir ct_bindir ct_incdir ct_incroot ct_datadir ct_demodir ct_templdir ct_tutdir ct_docdir ct_dir ct_mandir 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 GRAPHVIZDIR ARCHIVE DO_RANLIB RANLIB USERDIR INCL_USER_CODE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT use_sundials CVODE_LIBS IDA_LIBS sundials_include CANTERA_DEBUG_MODE phase_object_files phase_header_files COMPILE_IDEAL_SOLUTIONS COMPILE_ELECTROLYTES NEED_CATHERMO WITH_REACTORS KERNEL KERNEL_OBJ BUILD_CK LIB_DIR build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_DIR build_with_f2c build_f2c_lib LOCAL_LIB_DIRS LOCAL_LIBS CT_SHARED_LIB PYTHON_CMD BUILD_PYTHON NUMARRAY_INC_DIR NUMARRAY_HOME CANTERA_PYTHON_HOME CVSTAG MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX CXXFLAGS ac_ct_CXX CPP EGREP SOEXT SHARED PIC CXX_INCLUDES LCXX_FLAGS LCXX_END_LIBS HAVE_STRIPSYMBOLS F77 FFLAGS ac_ct_F77 FLIBS F90 BUILD_F90 F90FLAGS F90BUILDFLAGS 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 math_libs SO LDSHARED EXTRA_LINK TSCOMPARE_abs INSTALL_abs LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1323,10 +1323,24 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
if test -z $CANTERA_VERSION ; then
echo
echo ">>>>> Error <<<<<"
echo
echo "Run script 'preconfig', instead of running 'configure'"
echo "directly. The 'preconfig' script sets various variable values"
echo "needed by 'configure' and then runs 'configure.' You may want to"
echo "edit 'preconfig' first, to set various installation options."
echo
exit 1
fi
echo " "
echo "--------------------------------------------------------------"
echo " "
echo " Cantera Configuration Script "
echo " Cantera "$CANTERA_VERSION
echo " Configuration Script "
echo " "
echo "--------------------------------------------------------------"
echo " "
@ -1381,8 +1395,6 @@ if test $BITCOMPILE != $BITHARDWARE ; then
fi
# echo 'BITHARDWARE= ' $BITHARDWARE
# echo 'BITCOMPILE= ' $BITCOMPILE
@ -1394,7 +1406,7 @@ OS_IS_WIN=0
OS_IS_CYGWIN=0
EXTRA_LINK=${EXTRA_LINK:=""}
# default Matlab MEX file extension
mex_ext=mexglx
case $ac_sys_system in
@ -1410,7 +1422,6 @@ case $ac_sys_system in
esac
esac
#echo "ldemulationarg = " $ldemulationarg
@ -1708,6 +1719,7 @@ if test -n "$USER_SRC_DIR"; then USERDIR=$USER_SRC_DIR; INCL_USER_CODE=1; fi
use_sundials=0
sundials_inc=
CVODE_LIBS='-lcvode'
IDA_LIBS=''
if test "$USE_SUNDIALS" = "default"; then
ldsave=$LDFLAGS
@ -2652,7 +2664,7 @@ if test "${ac_cv_lib_sundials_cvodes_CVodeCreate+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsundials_cvodes \
-lsundials_shared -lsundials_nvecserial -lm $LIBS"
-lsundials_cvodes -lsundials_nvecserial -lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@ -2727,8 +2739,9 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
echo "using CVODES from SUNDIALS... Sensitivity analysis enabled."
CVODE_LIBS='-lsundials_cvodes -lsundials_shared -lsundials_nvecserial'
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes'
CVODE_LIBS='-lsundials_cvodes -lsundials_nvecserial'
IDA_LIBS='-lsundials_ida -lsundials_nvecserial'
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes -I'${SUNDIALS_HOME}'/include/ida'
echo "sundials include directory: " ${sundials_include}
fi
@ -2742,6 +2755,7 @@ fi
#########################################################
# The Cantera Kernel
#########################################################
@ -8537,7 +8551,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:8540:" \
echo "$as_me:8554:" \
"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
@ -8740,7 +8754,7 @@ _ACEOF
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_verb"
(eval echo $as_me:8743: \"$ac_link\") >&5
(eval echo $as_me:8757: \"$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
@ -8818,7 +8832,7 @@ _ACEOF
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
(eval echo $as_me:8821: \"$ac_link\") >&5
(eval echo $as_me:8835: \"$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
@ -8992,9 +9006,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
override_f77_libs=0;
#case $ac_sys_system in
# Darwin*) FLIBS='-lSystem'; override_f77_libs=1; SHARED_CTLIB=0;;
#esac
case $ac_sys_system in
Darwin*) FLIBS='-lSystem'; override_f77_libs=1; SHARED_CTLIB=0;;
esac
if test $override_f77_libs -gt 0; then
echo The Fortran 77 libraries on this platform are not correctly determined by
@ -9977,6 +9991,7 @@ s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@use_sundials@,$use_sundials,;t t
s,@CVODE_LIBS@,$CVODE_LIBS,;t t
s,@IDA_LIBS@,$IDA_LIBS,;t t
s,@sundials_include@,$sundials_include,;t t
s,@CANTERA_DEBUG_MODE@,$CANTERA_DEBUG_MODE,;t t
s,@phase_object_files@,$phase_object_files,;t t

View file

@ -7,10 +7,24 @@ AC_CONFIG_HEADER(config.h)
# AC_CONFIG_SRCDIR(./License.txt)
AC_CONFIG_AUX_DIR(config)
if test -z $CANTERA_VERSION ; then
echo
echo ">>>>> Error <<<<<"
echo
echo "Run script 'preconfig', instead of running 'configure'"
echo "directly. The 'preconfig' script sets various variable values"
echo "needed by 'configure' and then runs 'configure.' You may want to"
echo "edit 'preconfig' first, to set various installation options."
echo
exit 1
fi
echo " "
echo "--------------------------------------------------------------"
echo " "
echo " Cantera Configuration Script "
echo " Cantera "$CANTERA_VERSION
echo " Configuration Script "
echo " "
echo "--------------------------------------------------------------"
echo " "
@ -62,8 +76,6 @@ if test $BITCOMPILE != $BITHARDWARE ; then
fi
# echo 'BITHARDWARE= ' $BITHARDWARE
# echo 'BITCOMPILE= ' $BITCOMPILE
AC_SUBST(BITCOMPILE)
AC_SUBST(BITHARDWARE)
AC_SUBST(BITCHANGE)
@ -75,7 +87,7 @@ OS_IS_WIN=0
OS_IS_CYGWIN=0
EXTRA_LINK=${EXTRA_LINK:=""}
# default Matlab MEX file extension
mex_ext=mexglx
case $ac_sys_system in
@ -91,7 +103,6 @@ case $ac_sys_system in
esac
esac
#echo "ldemulationarg = " $ldemulationarg
AC_SUBST(ldemulationarg)
@ -290,6 +301,7 @@ AC_SUBST(INCL_USER_CODE)
use_sundials=0
sundials_inc=
CVODE_LIBS='-lcvode'
IDA_LIBS=''
if test "$USE_SUNDIALS" = "default"; then
ldsave=$LDFLAGS
@ -297,7 +309,7 @@ LDFLAGS='-L'$SUNDIALS_HOME/lib' '$ldsave
fi
AC_CHECK_LIB(sundials_cvodes, CVodeCreate, [use_sundials=1], [use_sundials=0],\
[-lsundials_shared -lsundials_nvecserial -lm])
[-lsundials_cvodes -lsundials_nvecserial -lm])
if test "x$USE_SUNDIALS" = "xy"; then
use_sundials=1
@ -306,8 +318,9 @@ fi
if test ${use_sundials} = 1; then
AC_DEFINE(HAS_SUNDIALS)
echo "using CVODES from SUNDIALS... Sensitivity analysis enabled."
CVODE_LIBS='-lsundials_cvodes -lsundials_shared -lsundials_nvecserial'
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes'
CVODE_LIBS='-lsundials_cvodes -lsundials_nvecserial'
IDA_LIBS='-lsundials_ida -lsundials_nvecserial'
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes -I'${SUNDIALS_HOME}'/include/ida'
echo "sundials include directory: " ${sundials_include}
fi
@ -318,6 +331,7 @@ fi
AC_SUBST(use_sundials)
AC_SUBST(CVODE_LIBS)
AC_SUBST(IDA_LIBS)
AC_SUBST(sundials_include)
@ -959,9 +973,9 @@ dnl Checks for libraries.
AC_F77_LIBRARY_LDFLAGS()
override_f77_libs=0;
#case $ac_sys_system in
# Darwin*) FLIBS='-lSystem'; override_f77_libs=1; SHARED_CTLIB=0;;
#esac
case $ac_sys_system in
Darwin*) FLIBS='-lSystem'; override_f77_libs=1; SHARED_CTLIB=0;;
esac
if test $override_f77_libs -gt 0; then
echo The Fortran 77 libraries on this platform are not correctly determined by

View file

@ -88,6 +88,7 @@ int equil_example1(int job) {
if (temp > gas.maxTemp()) break;
gas.setState_TPX(temp, pres, "SIH4:0.01, H2:0.99");
// equilibrate(gas,"TP",1,1.0e-9,1000,100,15);
equilibrate(gas,"TP");
output(0,i) = temp;
output(1,i) = gas.pressure();

View file

@ -29,7 +29,7 @@ int run_example(int n, exfun f, int job = 2) {
// array of example functions
exfun fex[] = {kinetics_example1, kinetics_example2, kinetics_example3,
equil_example1,
transport_example1, transport_example2, rxnpath_example1};
transport_example1, transport_example2}; //, rxnpath_example1};
// main program

View file

@ -1,3 +1,4 @@
#define IEEE_8087
#define Arith_Kind_ASL 1
#define IEEE_MC68k
#define Arith_Kind_ASL 2
#define Double_Align
#define NANCHECK

View file

@ -23,8 +23,8 @@
# If you define this to be <prefix>, then instead of running this
# script as ./configure --prefix=<prefix> you can just run it as
# ./configure
# script as ./preconfig --prefix=<prefix> you can just run it as
# ./preconfig
CANTERA_CONFIG_PREFIX=${CANTERA_CONFIG_PREFIX:=""}
@ -41,13 +41,10 @@ CANTERA_CONFIG_PREFIX=${CANTERA_CONFIG_PREFIX:=""}
#
# In addition to being one of the supported language interfaces,
# Python is used internally by Cantera, both in the build process and
# at run time (to process .cti input files). Therefore, you generally need to
# have Python on your system; if you don't, first install it from
# http://www.python.org before proceeding with the installation of
# Cantera.
# However, it is possible to use Cantera without Python, if you want
# to work only with Cantera in C++ or Fortran, and plan to use CTML
# input files, rather than CTI input files.
# at run time (to process .cti input files). Therefore, you generally
# need to have Python on your system; if you don't, first install it
# from http://www.python.org before proceeding with the installation
# of Cantera.
#
# If you plan to work in Python, or you want to use the graphical
# MixMaster application, then you need the full Cantera Python
@ -203,6 +200,8 @@ WITH_IDEAL_SOLUTIONS=${WITH_IDEAL_SOLUTIONS:="n"}
# Enable expanded electrochemistry capabilities, include thermo
# models for electrolyte solutions
WITH_ELECTROLYTES=${WITH_ELECTROLYTES:="n"}
######################################################################
# if set to 'y', the ck2cti program that converts Chemkin input files
# to Cantera format will be built. If you don't use Chemkin format
@ -253,8 +252,8 @@ ENABLE_TPX='y'
#
# See: http://www.llnl.gov/CASC/sundials
#
USE_SUNDIALS=${USE_SUNDIALS:='y'}
SUNDIALS_HOME=${SUNDIALS_HOME:=/usr/local/sundials}
USE_SUNDIALS=${USE_SUNDIALS:='default'}
SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials}
#-----------------------------------------------------------------
# BLAS and LAPACK
@ -272,6 +271,9 @@ SUNDIALS_HOME=${SUNDIALS_HOME:=/usr/local/sundials}
#'-llapack -lf77blas -lcblas -latlas'
#BLAS_LAPACK_DIR='/usr/lib'
#
# Note that on Mac OSX, BLAS and LAPACK from the built-in 'Accelerate'
# framework are used by default, and nothing needs to be specified
# here.
#
# The options below do not need to be set if you are using the default
# libraries.
@ -286,6 +288,7 @@ LAPACK_FTN_TRAILING_UNDERSCORE='y'
# Currently this must be set to 'y'.
LAPACK_FTN_STRING_LEN_AT_END='y'
#------------------------------------------------------------------
# C++ compiler options
#------------------------------------------------------------------
@ -333,10 +336,10 @@ SHARED=${SHARED:="-shared"}
# f2c-generated C sources instead of using the F77 sources in the ext
# directory.
# The default is not to do this on all platforms except vc++.
# Set this to "n" to never do this on any platform.
# Note, if set to "y", Cantera does not need a fortran compiler, and
# all fortran compiler parameters below are irrelevant.
# The default is to use the f2c code. Set this to "n" to never do
# this on any platform. 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:="y"}
@ -359,7 +362,7 @@ FFLAGS=${FFLAGS:='-O3'}
# the command to create a static library.
ARCHIVE=${ARCHIVE:="ar ruv"} # linux
# ARCHIVE=${ARCHIVE:="libtool -static -o"} # Mac OSX
# ARCHIVE=${ARCHIVE:="libtool -static -o"} # Mac OSX (this is set automatically)
# ARCHIVE=${ARCHIVE:="CC -xar -o"} # Solaris using SUNspro compilers
# the command to run 'ranlib' if it is needed.
@ -388,8 +391,8 @@ CT_SHARED_LIB=${CT_SHARED_LIB:=clib}
# lowercase 'helvetica'.
RPFONT=${RPFONT:="Helvetica"}
CANTERA_VERSION=${CANTERA_VERSION:="1.6.0"}
# Don't change this.
CANTERA_VERSION=${CANTERA_VERSION:="1.7.0"}
#-----------------------------------------------------------------------
#------------------- don't change anything below!! ---------------------