This is the 0.3.2 release of PySE.

The official name will from now be:

PySE - Python Stencil Environment.

The word 'PyFDM' will be reserved for a more complete FDM tool that may appear in the future.

The in the toplevel directory can be used to build and install everything. The two required modules, DegMatSparse and pyfdm/clib will be build automatically. There are separate files in those directories if you want to build the extensions manually.

Due to historical reasons, some of the required modules live in a separta namespace, pyPDE. These modules are also installed by the setup script.

Required software:

Given version numbers are those we have actually tested. The software may work with earlier releases.

NumPy >= 1.7.1 but < 1.9 (due to reliance on numarray, removed from recent versions of NumPy) pypar >= v. 1.9.2. Pypar can be downloaded from


gnuplot >= v. 4.0 gnuplot-py >= v. 1.7. Python gnuplot bindings, can be downloaded from


swig >= v. 1.3.25 - required to build DegMatSparse


Installation should be done with:

python install [--prefix=/I/want/it/here]

The installation assumes that your C++ compiler is 'g++'. If you need to use another compiler, specify in the CXX environment variable:

export CXX=i++

The compiler is used to create extension modules for Python, so a compiler suitable to compile dynamic loadable modules for Python must be specified.

Remark: If the DegMatSparse library is installed manually, the user must first issue 'python build', then 'python install' in order to get the options for swig correct.

Note that older versions of NumPy can be installed easily in a separate environment by using conda:

$ conda create -n np1.7 numpy=1.7 matplotlib=1.2.1 $ source activate np1.7 $ conda install swig $ conda install setuptools $ easy_install gnuplot-py $ python install $ cd tests && make

BUG: install is broken on OS X 10.9 but runs on Linux (RedHat 6.5 and Ubuntu 14)

Basic usage:

from pyFDM import *

User documentation will be added later on.

There are some examples in the examples subdirectory.

TODO list:
  • use Maptlotlib instead of Gnuplot for plotting
  • remove some unnecessary dependencies
  • add plotting capabilities in the packages (now: external, or rather internal) - some work has been done, the plotting capabilities are now included in the released files. But this should be improved.
  • Add documentation.

On the mathematical side:

  • Add support for nonlinear problems
  • Add support for higher order methods
  • Add support for more complex geometry
  • Interface linear solver packages.

Asmund Odegard (aa at simula dot no), Simula Research Laboratory AS