*** empty log message ***
This commit is contained in:
parent
95c3f63e0c
commit
080bff99a7
10 changed files with 3948 additions and 1530 deletions
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef CT_EXAMPLE_UTILS_H
|
||||
#define CT_EXAMPLE_UTILS_H
|
||||
|
||||
#include "kernel/Array.h"
|
||||
#include "kernel/plots.h"
|
||||
#include <cantera/kernel/Array.h>
|
||||
#include <cantera/kernel/plots.h>
|
||||
|
||||
// Save the temperature, density, pressure, and mole fractions at one
|
||||
// time
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#include <cantera/zerodim.h>
|
||||
#include <cantera/IdealGasMix.h>
|
||||
#include <cantera/numerics.h>
|
||||
|
||||
#include <time.h>
|
||||
#include "example_utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,26 @@
|
|||
|
||||
import sys
|
||||
|
||||
bindir = 'c:/cantera/bin'
|
||||
libdir = 'd:/dgg/dv/sf/cantera/build/lib/i686-pc-win32'
|
||||
incdir = 'd:/dgg/dv/sf/cantera/build/include'
|
||||
dflibdir = 'D:\Program Files\Microsoft Visual Studio\DF98\LIB'
|
||||
|
||||
libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes',
|
||||
'cvode', 'ctlapack', 'ctmath', 'ctblas', 'tpx']
|
||||
bindir = '/usr/local/bin'
|
||||
libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.2.0'
|
||||
incdir = '/Users/dgg/dv/sf/cantera/build/include'
|
||||
libs = ' -loneD -lzeroD -ltransport -lcantera -lrecipes -lcvode -lctlapack -lctmath -lctblas -ltpx -lg2c -lgcc'
|
||||
|
||||
f = open('setup.m','w')
|
||||
f.write('cd cantera\nbuild_cantera\nexit\n')
|
||||
f.write('cd cantera\nbuildux\nexit\n')
|
||||
f.close()
|
||||
|
||||
fb = open('cantera/build_cantera.m','w')
|
||||
fb = open('cantera/buildux.m','w')
|
||||
fb.write("""
|
||||
disp('building Cantera..');
|
||||
mex -I"""+incdir+""" private/ctmethods.cpp private/ctfunctions.cpp ...
|
||||
mex private/ctmethods.cpp private/ctfunctions.cpp ...
|
||||
private/xmlmethods.cpp private/phasemethods.cpp ...
|
||||
private/thermomethods.cpp private/kineticsmethods.cpp ...
|
||||
private/transportmethods.cpp private/reactormethods.cpp ...
|
||||
private/wallmethods.cpp private/flowdevicemethods.cpp ...
|
||||
private/onedimmethods.cpp private/surfmethods.cpp private/write.cpp ...
|
||||
"""+'-I'+incdir+' -L'+libdir+' '+libs+'\n'+"""disp('done.');
|
||||
""")
|
||||
s = ''
|
||||
for lib in libs:
|
||||
s += ' '+libdir+'/'+lib+'.lib ...\n'
|
||||
fb.write(s)
|
||||
fb.write(' "'+dflibdir+'/dformd.lib" ...\n')
|
||||
fb.write(' "'+dflibdir+'/dfconsol.lib" ...\n')
|
||||
fb.write(' "'+dflibdir+'/dfport.lib" \n')
|
||||
fb.close()
|
||||
|
||||
fp = open('cantera/ctbin.m','w')
|
||||
|
|
|
|||
40
Cantera/matlab/setup_winmatlab.py.in
Normal file
40
Cantera/matlab/setup_winmatlab.py.in
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
import sys
|
||||
|
||||
bindir = '@ct_bindir@'
|
||||
libdir = '@buildlib@'
|
||||
incdir = '@buildinc@'
|
||||
dflibdir = '@CVF_LIBDIR@'
|
||||
|
||||
libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes',
|
||||
'cvode', 'ctlapack', 'ctmath', 'ctblas', 'tpx']
|
||||
|
||||
f = open('setup.m','w')
|
||||
f.write('cd cantera\nbuild_cantera\nexit\n')
|
||||
f.close()
|
||||
|
||||
fb = open('cantera/build_cantera.m','w')
|
||||
fb.write("""
|
||||
disp('building Cantera..');
|
||||
mex -I"""+incdir+""" private/ctmethods.cpp private/ctfunctions.cpp ...
|
||||
private/xmlmethods.cpp private/phasemethods.cpp ...
|
||||
private/thermomethods.cpp private/kineticsmethods.cpp ...
|
||||
private/transportmethods.cpp private/reactormethods.cpp ...
|
||||
private/wallmethods.cpp private/flowdevicemethods.cpp ...
|
||||
private/onedimmethods.cpp private/surfmethods.cpp private/write.cpp ...
|
||||
""")
|
||||
s = ''
|
||||
for lib in libs:
|
||||
s += ' '+libdir+'/'+lib+'.lib ...\n'
|
||||
fb.write(s)
|
||||
fb.write(' "'+dflibdir+'/dformd.lib" ...\n')
|
||||
fb.write(' "'+dflibdir+'/dfconsol.lib" ...\n')
|
||||
fb.write(' "'+dflibdir+'/dfport.lib" \n')
|
||||
fb.close()
|
||||
|
||||
fp = open('cantera/ctbin.m','w')
|
||||
fp.write("""function path = ctbin
|
||||
path = '"""+bindir+"""';
|
||||
""")
|
||||
fp.close()
|
||||
|
||||
|
|
@ -62,6 +62,7 @@ all: config.h $(PCH) @KERNEL@ lib
|
|||
config.h: ../../config.h
|
||||
cp -f ../../config.h ./config.h
|
||||
|
||||
# @(if test "x`diff -bB --brief config.h ../../config.h`" != "x"; then (cp -f ../../config.h ./config.h; echo 'copied ../../config.h'); fi)
|
||||
|
||||
%.h.gch:
|
||||
ifeq (@precompile_headers@,yes)
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ namespace Cantera {
|
|||
copy(soln, soln + m_x.size(), m_x.begin());
|
||||
}
|
||||
|
||||
const doublereal* solution() const { return m_x.begin(); }
|
||||
|
||||
protected:
|
||||
|
||||
vector_fp m_x; // the solution vector
|
||||
|
|
|
|||
96
INSTALLING
96
INSTALLING
|
|
@ -1,18 +1,21 @@
|
|||
|
||||
Cantera should build 'out of the box' on linux, cygwin, Mac OS X, and
|
||||
Solaris. It should build on most other variants of unix with some
|
||||
tweaking. The build process runs a few Python scripts, so you need to
|
||||
have Python present whether or not you plan to install the Cantera
|
||||
Python interface. Linux and Mac OS X have python pre-installed; many
|
||||
other systems have it too. If yours does not, you can get it at
|
||||
www.python.org.
|
||||
Cantera should build 'out of the box' on systems running linux,
|
||||
cygwin, Mac OS X, Solaris, and MS-Windows. The Windows build procedure
|
||||
differs from the procedure for unix-like systems; it is described
|
||||
after the unix build procedure.
|
||||
|
||||
The Python scripting language must be installed before building
|
||||
Cantera, since a few Python scripts are run during the build
|
||||
process. Linux and Mac OS X systems come with Python preinstalled; for
|
||||
other systems, Python can be downloaded from www.python.org.
|
||||
|
||||
|
||||
====================================================================
|
||||
Build Instructions
|
||||
Unix/Linux Build Instructions
|
||||
====================================================================
|
||||
|
||||
To build Cantera and install it in /usr/local:
|
||||
To build Cantera with a default configuration and install it in
|
||||
/usr/local, type:
|
||||
|
||||
./configure
|
||||
make
|
||||
|
|
@ -51,16 +54,22 @@ cantera will be installed into these directories.
|
|||
Configuring the Environment
|
||||
---------------------------
|
||||
|
||||
The build process will create an initialization script 'cantera.rc'. Type
|
||||
The build process will create a shell script 'cantera.cfg' that
|
||||
configures the environment for Cantera. This should be run by typing
|
||||
|
||||
source /usr/local/cantera/cantera.rc
|
||||
source /usr/local/cantera/cantera.cfg
|
||||
|
||||
to set the environment for Cantera. Alternatively, copy cantera.rc to your
|
||||
home directory as .cantera, and add the line
|
||||
to set environment variables before using Cantera. This may not be
|
||||
necessary if a default installation into /usr/local is done, but is
|
||||
necessary if a custom installation is done.
|
||||
|
||||
source .cantera
|
||||
If the HOME environment variable is set, the build process will copy
|
||||
cantera.cfg to your home directory. You can insure that the latest
|
||||
version of cantera.cfg is run every time you log in by adding the line
|
||||
|
||||
to your login script.
|
||||
source cantera.cfg
|
||||
|
||||
to your shell login script.
|
||||
|
||||
|
||||
|
||||
|
|
@ -71,29 +80,76 @@ If Python 2.x is installed, and the Numeric package is installed, then
|
|||
the Cantera Python interface will be built and installed.
|
||||
|
||||
|
||||
|
||||
The MATLAB Toolbox
|
||||
------------------
|
||||
|
||||
If MATLAB is present, the MATLAB toolbox will be built and installed.
|
||||
If this is not desired, set environment variable BUILD_MATLAB_TOOLBOX
|
||||
to anything but "y" before running the 'configure' script, or edit the 'configure' script to set
|
||||
|
||||
|
||||
|
||||
Customizing
|
||||
-----------
|
||||
|
||||
Before running configure, the following environment variables may be set:
|
||||
The configure script may be customized by editing it to set the values
|
||||
of various variables before running it. Alternatively, these variables
|
||||
may be set in the environment before running configure.
|
||||
|
||||
Some of the variables that may be set are listed here.
|
||||
|
||||
MAKE set to 'make' utility compatible with GNU make
|
||||
|
||||
CXX C++ compiler
|
||||
CXX C++ compiler (default: 'g++')
|
||||
|
||||
F77 Fortran 77 compiler
|
||||
F77 Fortran 77 compiler (default: 'g77')
|
||||
|
||||
PYTHON_CMD Python interpreter to use with Cantera
|
||||
(default: 'python')
|
||||
|
||||
MATLAB_CMD Matlab command (default: 'matlab')
|
||||
|
||||
Additional customization can be done by editing the configure script
|
||||
before running it.
|
||||
|
||||
|
||||
|
||||
|
||||
====================================================================
|
||||
Windows Build Instructions
|
||||
====================================================================
|
||||
|
||||
Requirements:
|
||||
|
||||
1) cygwin (www.cygwin.com)
|
||||
2) python (www.python.org)
|
||||
3) MS Visual C++ 6.0
|
||||
4) Compaq Visual Fortran 6.0
|
||||
|
||||
The Cantera build procedure for Windows requires the cygwin linux-like
|
||||
environment, so that the 'configure' script can be run and the 'make'
|
||||
utility used. Cygwin can be downloaded from www.cygwin.com. Only a
|
||||
minimal cygwin installation is needed. In particular, no compilers are
|
||||
required. During the installation of cygwin, you will be asked if text
|
||||
files should use unix or DOS line endings; select DOS.
|
||||
|
||||
Cantera can be built under Windows using Microsoft Visual C++ 6.0 and
|
||||
Compaq Visual Fortran 6.0.
|
||||
|
||||
To perform a Windows installation, open a cygwin shell window, go to the
|
||||
top-level directory of the Cantera source tree, and type
|
||||
|
||||
./configure
|
||||
|
||||
By default, Cantera will be installed in c:/cantera; to change this,
|
||||
specify the prefix option as described for the unix build procedure
|
||||
above.
|
||||
|
||||
After running configure, start Visual Studio and open workspace
|
||||
win32/cantera.dsw. Set the build configuration to 'Release' and build
|
||||
project 'all'. When this finishes, return to the cygwin shell and type
|
||||
|
||||
make win
|
||||
make win-install
|
||||
|
||||
After these commands finish, you should have a complete Cantera
|
||||
installation including the Python interface and the Matlab toolbox.
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@ demos: example_codes
|
|||
# build the Cantera static libraries
|
||||
kernel:
|
||||
@INSTALL@ -d @buildlib@
|
||||
@INSTALL@ -d @buildbin@
|
||||
rm -f @buildlib@/*.a
|
||||
rm -f @buildlib@/*.so
|
||||
rm -f @buildbin@/*
|
||||
cd ext; @MAKE@
|
||||
cd Cantera/src; @MAKE@
|
||||
|
||||
|
|
|
|||
5304
config/configure
vendored
5304
config/configure
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -579,7 +579,7 @@ AC_OUTPUT(../Cantera/Makefile \
|
|||
../test_problems/diamondSurf/Makefile )
|
||||
# )
|
||||
|
||||
cp -f ../config.h ../Cantera/src
|
||||
#cp -f ../config.h ../Cantera/src
|
||||
echo
|
||||
if test "x${OS_IS_WIN}" = "x0"; then
|
||||
echo "Now type '${MAKE}' to build Cantera"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue