This is not for the faint of heart! But it gets better.

Installation prerequisites:
---------------------------
    recent numpy, scipy (with umfpack wrapper, or umfpack scikit), swig

Dependencies:
-------------
    matplotlib, pyparsing, umfpack, pytables
    schroedinger.py requires pysparse, gmsh (2D), tetgen (3D)
    log.py (live plotting) requires multiprocessing, matplotlib with GTKAgg
    isfepy requires ipython, matplotlib with WXAgg
    postproc.py requires mayavi2

SfePy is known to work on various flavours of Linux, on Intel Macs and Windows.

On Linux, consult the package manager of your favourite distribution.
For example in Gentoo:
  $ emerge -va pytables pyparsing numpy scipy matplotlib ipython
in Debian:
  $ apt-get install python-tables python-pyparsing python-matplotlib python-scipy

On Windows, all the required packages are part of the Enthought Python
Distribution (EPD) [1] which is free for academic purposes. A completely
free Python(x,y) [2] can be used too, but pyparsing has to be installed
manually.

[1] http://www.enthought.com/products/epd.php
[2] http://www.pythonxy.com/foreword.php

SfePy can be used without any installation (see In-place compilation...) by
running the scripts from the top-level directory of the distribution
(TOPDIR) (see Examples), or can be installed locally or system-wide (see
Installation).

In-place compilation of C extension modules:
--------------------------------------------
Using the Makefile (Linux, Mac OS X):
  1. Look at site_cfg_template.py and follow the instructions therein.
  2. (Optionally) edit the Makefile:
    - compiler, swig command, ...
  3. 'make'

Using distutils (all platforms):
  python setup.py build_ext --inplace

Installation:
-------------

system-wide: 'python setup.py install'
local: 'python setup.py install --root=<installation prefix>'

Examples:
---------

Run the executable script 'simple.py' in the top-level directory of the
distribution (TOPDIR). The unix-style calls are used below,
on windows use 'python <script>' in place of './<script>'.

Basic usage:
'./simple.py input/poisson.py' ... creates simple.vtk
'./simple.py input/pfdpm_permeability.py' ... creates perf_symm944t.vtk
'./runTests.py' ... see Testing below
'./isfepy' ... follow the help printed on its startup

Surface extraction:
'./findSurf.py database/t.1.node -' ... creates surf_t.1.mesh

Applications (look at the Dependencies!):
- phononic materials:
  './eigen.py -p input/phono/band_gaps.py' ... see input/phono/output/
- schroedinger.py (order is important below):
  './schroedinger.py --2d --mesh'
  './schroedinger.py --2d --hydrogen'
  './postproc.py mesh.vtk'

Stand-alone examples:

'python examples/rs_correctors.py'
'python examples/compare_elastic_materials.py'
'python examples/live_plot.py'

Testing:
--------

Run './runTests.py' or './runTests.py --filter-less' in TOPDIR.

Tests that save results save them into TOPDIR/output-tests directory. View the
results (*.vtk) with a VTK-capable viewer (e.g. paraview, mayavi2).

No failures should be reported.

If you get some failures it probably means some optional packages are not
installed. Also be sure to have a recent version of Numpy and SciPy installed
(latest releases or SVN versions are the best bet). Verify also your pytables
(hdf5) installation (possible test_io.py failures).

To debug a failure, run './runTests.py --debug'.
See also './runTests.py --help' for further options.

Documentation:
--------------

Documentation is in doc/sfepy_manual.pdf. The file can be automatically
generated using the ./gen script in TOPDIR. To run the script 'pexpect' and
'lxml' packages are required. If you want to update, or regenerate, the
documentation and have the prerequisites installed, do "./gen".

If doxygen is installed, the documentation of data structures and functions can
be automatically generated by running 'make htmldocs'. Then see
'TOPDIR/doc/html/index.html'.

See also 'http://sfepy.org' or 'http://sfepy.kme.zcu.cz'.
