*** empty log message ***
This commit is contained in:
parent
bdd1165311
commit
eee9f3023d
8 changed files with 3265 additions and 4932 deletions
|
|
@ -21,7 +21,7 @@ using namespace std;
|
|||
// The Cantera logger class
|
||||
#include "kernel/logger.h"
|
||||
|
||||
using namespace Cantera;
|
||||
//using namespace Cantera;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -11,19 +11,8 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#ifdef SUNDIALS_VERSION_22
|
||||
|
||||
// sundials includes
|
||||
#ifdef SUNDIALS_VERSION_1
|
||||
#include <sundialstypes.h>
|
||||
#include <sundialsmath.h>
|
||||
#include <cvodes.h>
|
||||
#include <cvdense.h>
|
||||
#include <cvdiag.h>
|
||||
#include <cvband.h>
|
||||
#include <cvspgmr.h>
|
||||
#include <nvector.h>
|
||||
#include <nvector_serial.h>
|
||||
#else
|
||||
#include <sundials_types.h>
|
||||
#include <sundials_math.h>
|
||||
#include <cvodes.h>
|
||||
|
|
@ -31,8 +20,27 @@ using namespace std;
|
|||
#include <cvodes_diag.h>
|
||||
#include <cvodes_spgmr.h>
|
||||
#include <cvodes_band.h>
|
||||
//#include <nvector.h>
|
||||
#include <nvector_serial.h>
|
||||
|
||||
#else
|
||||
|
||||
#ifdef SUNDIALS_VERSION_23
|
||||
#include <sundials/sundials_types.h>
|
||||
#include <sundials/sundials_math.h>
|
||||
#include <sundials/sundials_nvector.h>
|
||||
#include <nvector/nvector_serial.h>
|
||||
#include <cvodes/cvodes.h>
|
||||
#include <cvodes/cvodes_dense.h>
|
||||
#include <cvodes/cvodes_diag.h>
|
||||
#include <cvodes/cvodes_spgmr.h>
|
||||
#include <cvodes/cvodes_band.h>
|
||||
|
||||
#else
|
||||
|
||||
unsupported sundials version!
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
inline static N_Vector nv(void* x) {
|
||||
|
|
|
|||
|
|
@ -24,13 +24,14 @@
|
|||
#include "ct_defs.h"
|
||||
|
||||
//#include <nvector.h>
|
||||
#include <nvector_serial.h>
|
||||
//#include <nvector_serial.h>
|
||||
|
||||
#include <sundials/sundials_nvector.h>
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
class FuncData;
|
||||
|
||||
|
||||
/**
|
||||
* Exception thrown when a CVODES error is encountered.
|
||||
*/
|
||||
|
|
|
|||
13
config.h.in
13
config.h.in
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Run the 'configure' script to generate 'config.h' from this input file.
|
||||
// Run the 'preconfig' script to generate 'config.h' from this input file.
|
||||
//
|
||||
#ifndef CT_CONFIG_H
|
||||
#define CT_CONFIG_H
|
||||
|
|
@ -7,11 +7,6 @@
|
|||
|
||||
//------------------------ Development flags ------------------//
|
||||
//
|
||||
// These flags turn on or off features that are still in
|
||||
// development and are not yet stable.
|
||||
|
||||
#define DEV_EQUIL
|
||||
|
||||
// Compile in additional debug printing where available.
|
||||
// Note, the printing may need to be turned on via a switch.
|
||||
// This just compiles in the code.
|
||||
|
|
@ -47,13 +42,11 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
|
||||
|
||||
#undef HAS_SUNDIALS
|
||||
#undef SUNDIALS_VERSION_22
|
||||
#undef SUNDIALS_VERSION_23
|
||||
|
||||
//-------- LAPACK / BLAS ---------
|
||||
|
||||
// Define if you are using LAPACK and BLAS from the Intel Math Kernel
|
||||
// Library
|
||||
#undef HAVE_INTEL_MKL
|
||||
|
||||
#define LAPACK_FTN_STRING_LEN_AT_END
|
||||
#define LAPACK_NAMES_LOWERCASE
|
||||
#define LAPACK_FTN_TRAILING_UNDERSCORE
|
||||
|
|
|
|||
23
configure.in
23
configure.in
|
|
@ -306,13 +306,20 @@ sundials_inc=
|
|||
CVODE_LIBS='-lcvode'
|
||||
IDA_LIBS=''
|
||||
|
||||
if test "x$SUNDIALS_HOME" = "x"; then
|
||||
SUNDIALS_LIB_DIR=/usr/local/sundials/lib
|
||||
SUNDIALS_INC_DIR=/usr/local/include/sundials
|
||||
else
|
||||
SUNDIALS_LIB_DIR=$SUNDIALS_HOME/lib
|
||||
SUNDIALS_INC_DIR=$SUNDIALS_HOME/include
|
||||
fi
|
||||
|
||||
if test "$USE_SUNDIALS" = "default"; then
|
||||
ldsave=$LDFLAGS
|
||||
LDFLAGS='-L'$SUNDIALS_HOME/lib' '$ldsave
|
||||
LDFLAGS='-L'$SUNDIALS_LIB_DIR' '$ldsave
|
||||
|
||||
AC_CHECK_LIB(sundials_cvodes, CVodeCreate, [use_sundials=1], [use_sundials=0],\
|
||||
[-lsundials_cvodes -lsundials_nvecserial -lm])
|
||||
less conftest.c
|
||||
|
||||
LDFLAGS=$ldsave
|
||||
fi
|
||||
|
|
@ -324,12 +331,20 @@ fi
|
|||
if test ${use_sundials} = 1; then
|
||||
AC_DEFINE(HAS_SUNDIALS)
|
||||
echo "using CVODES from SUNDIALS... Sensitivity analysis enabled."
|
||||
|
||||
CVODE_LIBS='-lsundials_cvodes -lsundials_nvecserial'
|
||||
IDA_LIBS='-lsundials_ida -lsundials_nvecserial'
|
||||
|
||||
if test "$SUNDIALS_VERSION" = "2.2"; then
|
||||
AC_DEFINE(SUNDIALS_VERSION_22)
|
||||
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes -I'${SUNDIALS_HOME}'/include/ida'
|
||||
else
|
||||
AC_DEFINE(SUNDIALS_VERSION_23)
|
||||
sundials_include='-I'${SUNDIALS_INC_DIR}
|
||||
echo "sundials include directory: " ${sundials_include}
|
||||
echo "sundials library directory: " $SUNDIALS_HOME/lib
|
||||
python tools/src/sundials_version.py $SUNDIALS_HOME
|
||||
echo "sundials library directory: " $SUNDIALS_LIB_DIR
|
||||
# python tools/src/sundials_version.py $SUNDIALS_HOME
|
||||
fi
|
||||
fi
|
||||
|
||||
if test ${use_sundials} = 0; then
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#define IEEE_8087
|
||||
#define Arith_Kind_ASL 1
|
||||
#define Double_Align
|
||||
#define NANCHECK
|
||||
|
|
|
|||
59
preconfig
59
preconfig
|
|
@ -234,31 +234,41 @@ ENABLE_TPX='y'
|
|||
# CVODE / CVODES
|
||||
#-----------------------------------------------------------------
|
||||
#
|
||||
# Cantera uses the CVODE ODE integrator to time-integrate reactor
|
||||
# network ODE's and for various other purposes. An older version of
|
||||
# CVODE comes with Cantera, but it is possible to use the latest
|
||||
# version as well, which now supports sensitivity analysis (CVODES).
|
||||
# CVODES is a part of the 'sundials' package from Lawrence Livermore
|
||||
# National Laboratory. Sundials is not distributed with Cantera, but
|
||||
# it is free software that may be downloaded and installed
|
||||
# separately. If you have sundials, set SUNDIALS_HOME to the directory
|
||||
# where it is installed, or else put the sundials libraries on the
|
||||
# library path. If you leave USE_SUNDIALS = 'default', then it will
|
||||
# be used if you have it, and if not the older CVODE will be used. Or
|
||||
# set USE_SUNDIALS to 'y' or 'n' to force using it or not. Note that
|
||||
# sensitivity analysis with Cantera requires use of sundials.
|
||||
# Cantera uses the CVODE or CVODES ODE integrator to time-integrate
|
||||
# reactor network ODE's and for various other purposes. An older
|
||||
# version of CVODE comes with Cantera, but it is possible to use the
|
||||
# latest version as well, which now supports sensitivity analysis
|
||||
# (CVODES). CVODES is a part of the 'sundials' package from Lawrence
|
||||
# Livermore National Laboratory. Sundials is not distributed with
|
||||
# Cantera, but it is free software that may be downloaded and
|
||||
# installed separately. If you leave USE_SUNDIALS = 'default', then it
|
||||
# will be used if you have it, and if not the older CVODE will be
|
||||
# used. Or set USE_SUNDIALS to 'y' or 'n' to force using it or not.
|
||||
# Note that sensitivity analysis with Cantera requires use of
|
||||
# sundials.
|
||||
#
|
||||
# See: http://www.llnl.gov/CASC/sundials
|
||||
#
|
||||
USE_SUNDIALS=${USE_SUNDIALS:='default'}
|
||||
SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials}
|
||||
#SUNDIALS_VERSION=${SUNDIALS_VERSION:='2.2.0'}
|
||||
|
||||
# This is where you installed sundials if you used the --prefix option
|
||||
# when you configured sundials. If you didn't use the prefix option,
|
||||
# then comment this line out.
|
||||
SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials23}
|
||||
|
||||
# It is recommended that you install the newest release of sundials
|
||||
# (currently 2.3.0) before building Cantera. But if you want to use an
|
||||
# older version, set SUNDIALS_VERSION to the version you have.
|
||||
# Acceptable values are '2.2' and '2.3' only; anything else will cause
|
||||
# Cantera to not use sundials.
|
||||
SUNDIALS_VERSION=${SUNDIALS_VERSION:='2.3'}
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# BLAS and LAPACK
|
||||
#-----------------------------------------------------------------
|
||||
#
|
||||
# Cantera comes with Fortran versions of those parts of BLAS and
|
||||
# Cantera comes with Fortran (or c) versions of those parts of BLAS and
|
||||
# LAPACK it requires. But performance may be better if you use a
|
||||
# version of these libraries optimized for your machine hardware. If
|
||||
# you want to use your own libraries, set BLAS_LAPACK_LIBS to the
|
||||
|
|
@ -267,7 +277,7 @@ SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials}
|
|||
# libraries are located. Otherwise, leave these lines commented out.
|
||||
#
|
||||
#BLAS_LAPACK_LIBS='-llapack -lblas'
|
||||
#'-llapack -lf77blas -lcblas -latlas'
|
||||
#BLAS_LAPACK_LIBS'-llapack -lf77blas -lcblas -latlas'
|
||||
#BLAS_LAPACK_DIR='/usr/lib'
|
||||
#
|
||||
# Note that on Mac OSX, BLAS and LAPACK from the built-in 'Accelerate'
|
||||
|
|
@ -308,13 +318,12 @@ CXXFLAGS=${CXXFLAGS:="-O3 -Wall"}
|
|||
|
||||
# the C++ flags required for linking. Uncomment if additional flags
|
||||
# need to be passed to the linker.
|
||||
#LCXX_FLAGS="-framework Accelerate"
|
||||
|
||||
# Ending libraries to tack onto the linking of all C++ programs
|
||||
LCXX_END_LIBS=${LCXX_END_LIBS:="-lm"}
|
||||
|
||||
# the compiler flag to use to compile code that will be inserted into shared
|
||||
# libraries.
|
||||
# the compiler flag to use to compile code that will be inserted into
|
||||
# shared libraries.
|
||||
PIC=${PIC:=-fPIC}
|
||||
|
||||
# the compiler option to create a shared library from object files
|
||||
|
|
@ -372,9 +381,13 @@ RANLIB=${RANLIB:="ranlib"}
|
|||
# doesn't work, try GNU make.
|
||||
MAKE=${MAKE:=make}
|
||||
|
||||
# The directory location of the graphviz program, dot.
|
||||
# dot is used for creating of the documentation.
|
||||
# if "dot" is in your path, you can leave this unspecified.
|
||||
# The directory location of the graphviz program, dot. dot is used
|
||||
# for creating the documentation, and for making reaction path
|
||||
# diagrams. if "dot" is in your path, you can leave this unspecified.
|
||||
#
|
||||
# NOTE: MATLAB comes with a stripped-down version of 'dot'. If 'dot'
|
||||
# is on your path, make sure it is not the MATLAB version!
|
||||
#
|
||||
GRAPHVIZDIR=${GRAPHVIZDIR:=" "}
|
||||
|
||||
# file extensions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue