From The FEniCS project

This guide is tested on Ubuntu 9.04 and assumes you have root (sudo) access. The DOLFIN components will be installed locally to allow multiple simultaneous installations.

Contents

Installing required packages under Ubuntu/Debian

Installing the required and some optional packages:

sudo apt-get install build-essential scons mercurial libxml2-dev libgts-dev pkg-config \
python-dev python-numpy python-vtk swig libsuitesparse-dev libboost-dev \
libboost-serialization-dev, libboost-program-options-dev libboost-filesystem-dev

Download and install UFC:

hg clone http://www.fenics.org/hg/ufc
cd ufc
scons
scons install prefix=/usr/local

Download and install Viper (optional):

hg clone http://www.fenics.org/hg/viper
cd viper
sudo python setup.py install --prefix=/usr/local

It is possible to install without some of these packages by disabling features. For example, to compile without SWIG use option enablePython=no when configuring DOLFIN.

Downloading

The latest release can be downloaded from here. The development version can be cloned by

hg clone http://www.fenics.org/hg/dolfin

Configuring

Navigate to the root of the DOLFIN source tree and run

scons configure prefix=$PWD/local

To see available options, run

scons configure -h

Compiling

scons

To see available options, run

scons -h

Installing

scons install

Then update your environment by sourcing the file dolfin.conf:

source dolfin.conf

Compiling demos

To compile a specific demo program, navigate to that demo's subfolder and run scons. To compile all the demos, navigate to the top-level directory and simply run

scons configure enableDemos=yes && scons

Some of the demo programs requires other FEniCS packages to be installed:

Download and install FFC:

hg clone http://www.fenics.org/hg/ffc
cd ffc
sudo python setup.py install --prefix=/usr/local

Download and install UFL:

hg clone http://www.fenics.org/hg/ufl
cd ufl
sudo python setup.py install --prefix=/usr/local

Download and install Instant:

hg clone http://www.fenics.org/hg/instant
cd instant
sudo python setup.py install --prefix=/usr/local

Download and install FIAT:

hg clone http://www.fenics.org/hg/fiat
cd fiat
sudo python setup.py install --prefix=/usr/local
Personal tools