Added more documentation from the Cantera site into the cvs dox version
This commit is contained in:
parent
59d198cf50
commit
86a9d52762
2 changed files with 93 additions and 19 deletions
|
|
@ -12,34 +12,47 @@ Cantera can be built on most unix or unix-like platforms. Before you start, you'
|
|||
latest version at http://www.python.org. Python is used in the build
|
||||
process, and to process input files, so it is needed even if you
|
||||
plan to use Cantera only from C++, MATLAB, or Fortran.
|
||||
- \b numarray. If you \e do want to use Cantera from Python, or if you
|
||||
|
||||
- \b numarray. If you \e do want to use Cantera from Python, or if you
|
||||
want to run the graphical MixMaster application, you'll also need to
|
||||
install the numarray package, which may be obtained at
|
||||
http://sourceforge.net/projects/numpy . In most cases, all that is
|
||||
required to build numarray is to type "python setup.py install" from
|
||||
within the directory where you have unpacked the numarray source
|
||||
code.
|
||||
|
||||
|
||||
http://sourceforge.net/projects/numpy .
|
||||
Note that numarray is now superceded by "numpy", but Cantera hasn't yet been
|
||||
updated to use numpy. Be sure to get the "old" numarray. Once you have
|
||||
downloaded it, upack the tar file. In most cases, all that is required to
|
||||
build numarray is to type "python setup.py install" from within the directory
|
||||
where you have unpacked the numarray source code
|
||||
\see \ref installnumarray .
|
||||
|
||||
- <b>The GNU "make" program</b>. Most systems have this, but on some it might
|
||||
be called "gmake" instead of "make".
|
||||
be called "gmake" instead of "make". (On these systems "make" may refer to a
|
||||
similar but non-compatible program.)
|
||||
|
||||
- <b>A C/C++ compiler</b>. Virtually any reasonably recent compiler
|
||||
should work. The GNU gcc/g++ compiler, available free for many
|
||||
platforms, works fine.
|
||||
should work. The GNU gcc/g++ compiler, available free for many
|
||||
platforms, works fine.
|
||||
|
||||
- Optional:
|
||||
- <b>MATLAB</b>. Only needed to if you plan to use Cantera from MATLAB.
|
||||
To build the Cantera MATLAB Toolbox, your C/C++ compiler must be
|
||||
compatible with the one used to compile MATLAB. In most cases this means
|
||||
you need to use gcc/g++ version 3.x if you have MATLAB 7 (R14) and gcc/g++ 2.95 if you have MATLAB 6 (R13).
|
||||
- <b>a Fortran 90/95 compiler</b>. Only needed if you plan to use Cantera
|
||||
from Fortran 90/95.
|
||||
- Optional software:
|
||||
- <b>Sundials</b>. Sundials is a numerical software package for solving complex
|
||||
non-linear systems of differential and/or algebraic equations. If you have it,
|
||||
%Cantera will use it; if not, it will use an older, pre-sundials version of the
|
||||
ODE solver, and some other capabilities will not be supported (e.g.
|
||||
sensitivity analysis). It is recommended that you install sundials if
|
||||
possible. All you need to do is go to the sundials web site
|
||||
(www.llnl.gov/casc/sundials), download the software, and build it. To build
|
||||
it, just go into the directory where you have unpacked the source, type
|
||||
"./configure", "make", then "make install".
|
||||
- <b>MATLAB</b>. Only needed to if you plan to use Cantera from MATLAB.
|
||||
To build the Cantera MATLAB Toolbox, your C/C++ compiler must be
|
||||
compatible with the one used to compile MATLAB. In most cases this means
|
||||
you need to use gcc/g++ version 3.x if you have MATLAB 7 (R14) and gcc/g++ 2.95 if you have MATLAB 6 (R13).
|
||||
- <b>a Fortran 90/95 compiler</b>. Only needed if you plan to use Cantera
|
||||
from Fortran 90/95.
|
||||
.
|
||||
|
||||
- Note: On a Mac, you'll need to download the "XCode Tools" from Apple,
|
||||
which includes the gcc/g++ compiler and other GNU tools.
|
||||
|
||||
which includes the gcc/g++ compiler and other GNU tools.
|
||||
.
|
||||
|
||||
\section ctbuild-proc Build Procedure
|
||||
|
||||
|
|
|
|||
61
tools/doc/doxyinput/numarray.txt
Normal file
61
tools/doc/doxyinput/numarray.txt
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
\page installnumarray Installing numarray
|
||||
|
||||
If you plan to use %Cantera from Python, or want to run any of the Python demo scripts, or use the graphical MixMaster application, then you need to install the 'numarray' package.
|
||||
|
||||
Numarray provides capabilities for Python to work efficiently work large matrices, and is
|
||||
used by the %Cantera Python package.
|
||||
|
||||
\section numWin Installing numarray on Windows
|
||||
|
||||
If you are using a PC running Windows, go to http://sourceforge.net/projects/numpy and download the Windows binary installer for numarray. All you need to do is to execute this installer to install numarray.
|
||||
|
||||
\section numUnix Building and Installing numarray on a unix-like platform
|
||||
|
||||
On a unix-like (linux, Mac OS X) platform, you need to build numarray from source code. The procedure to do this is largely automated, and takes only a few minutes. Here's what you do:
|
||||
|
||||
- Get the source code from http://sourceforge.net/projects/numpy. This file should have a
|
||||
name like numarray-1.x.x.tar.gz.
|
||||
- Unpack the compresssed tar archive:
|
||||
\verbatim
|
||||
gunzip numarray-1.x.x.tar.gz
|
||||
tar xvf numarray-1.x.x.tar \endverbatim
|
||||
- Go into the directory created by unpacking the archive, and type at a shell prompt
|
||||
\verbatim
|
||||
python setup.py build \endverbatim
|
||||
This compiles everything, and puts the files in a temporary directory, ready to be
|
||||
installed wherever you specify in the next step.
|
||||
.
|
||||
|
||||
\section numAll Installing numarray for all users
|
||||
|
||||
If your are the system administrator and want to install numaray so that every user can access it, then simply type
|
||||
|
||||
\verbatim
|
||||
python setup.py install
|
||||
\endverbatim
|
||||
|
||||
You will probably have to run this command as super-user. Doing the install step this way will put
|
||||
the numarray module in the 'site-packages' subdirectory within the python 'lib' directory. This
|
||||
has the advantage that Python always looks in this directory for modules -- there is no need to
|
||||
set PYTHONPATH for the interpreter to find numarray. But it does require write access to the
|
||||
Python 'lib' directory, which typically only the system administrator has.
|
||||
|
||||
\section numLocal Installing a local version of numarray
|
||||
|
||||
If you are not the system administrator, then you can install a local version of numarray in your
|
||||
home directory by adding the --home option to the 'install' step. For example, if you want to
|
||||
install all numarray files within a directory named 'python_modules' in your home directory, then do this:
|
||||
|
||||
\verbatim
|
||||
python setup.py build
|
||||
python setup.py install --home=$HOME/python_modules
|
||||
\endverbatim
|
||||
|
||||
Note that if you use the --home option, you will need to configure %Cantera so that it knows where to
|
||||
find numarray. To do this, you can either set environment variable NUMARRAY_HOME to the directory
|
||||
you specified with the --home option (e.g. $HOME/python_modules), or edit the
|
||||
cantera 'preconfig' script to set this variable there.
|
||||
|
||||
*/
|
||||
|
||||
Loading…
Add table
Reference in a new issue