Downloading dolfin-adjoint

Dependencies

Mandatory dependencies:

Optional dependencies:

Binary packages (Ubuntu)

Binary packages are currently available for Ubuntu users through the launchpad PPA. To install dolfin-adjoint, do

sudo apt-add-repository ppa:libadjoint/ppa
sudo apt-get update
sudo apt-get install python-dolfin-adjoint

which should install the latest stable version on your system. Once that’s done, why not try out the tutorial?

Docker images (all platforms and versions)

Docker allows us to build and ship consistent high-performance FEniCS installations with dolfin-adjoint for almost any platform. To get started, follow these 2 steps:

  1. Install Docker. Mac and Windows users should install the Docker Toolbox (this is a simple one-click install) and Linux users should follow these instructions.

  2. Install the FEniCS Docker script:

    curl -s https://bitbucket.org/dolfin-adjoint/virtual/raw/master/bin/get.fenicsproject-adjoint | sh
    

If running on Mac or Windows, make sure you run this and other commands inside the Docker Quickstart Terminal.

Once both Docker and the FEniCS Docker script have been installed, you can easily start a FEniCS session with dolfin-adjoint by running the following command:

fenicsproject-adjoint run quay.io/dolfinadjoint/dolfin-adjoint

The FEniCS Docker script can also be used to create persistent sessions (fenicsproject-adjoint create myproject followed by fenicsproject-adjoint run myproject) or to run different versions of FEniCS (fenicsproject-adjoint run quay.io/dolfinadjoint/dev-dolfin-adjoint). To see more options, run the following command:

fenicsproject-adjoint help

For more details and tips on how to work with FEniCS and Docker, see our FEniCS Docker page.

From source

The latest stable release of dolfin-adjoint and libadjoint is version 2016.1 which is compatible with FEniCS 2016.1. Download links:

  • libadjoint:
git clone -b libadjoint-2016.1.0 https://bitbucket.org/dolfin-adjoint/libadjoint
  • dolfin-adjoint:
git clone -b dolfin-adjoint-2016.1.0 https://bitbucket.org/dolfin-adjoint/dolfin-adjoint

The development version is available with the following command:

git clone https://bitbucket.org/dolfin-adjoint/libadjoint
git clone https://bitbucket.org/dolfin-adjoint/dolfin-adjoint

As dolfin-adjoint is a pure Python module, once its dependencies are installed the development version can be used without system-wide installation via

export PYTHONPATH=<path to dolfin-adjoint>:$PYTHONPATH

libadjoint needs to be compiled with:

cd libadjoint
mkdir build; cd build
cmake -DCMAKE_INSTALL_PREFIX=<install directory> ..
make install

Contributions (such as handling new features of FEniCS, or new test cases or examples) are very welcome.

Virtual machine

If you’d like to try dolfin-adjoint out without any installation headaches, try out the FENICS VirtualBox virtual machine with FEniCS and dolfin-adjoint pre-installed. Here are the instructions:

  • Download and install VirtualBox from https://www.virtualbox.org, or from your operating system.
  • Download the virtual machine.
  • Start VirtualBox, click on “File -> Import Appliance”, select the virtual machine image and click on “Import”.
  • Select the “dolfin-adjoint VM” and click on “Start” to boot the machine.
  • For installing new software you need the login credentials:
    • Username: fenics
    • Password: fenics

Older versions

An older version compatible with FEniCS 1.6 can be downloaded with:

git clone -b dolfin-adjoint-1.6 https://bitbucket.org/dolfin-adjoint/dolfin-adjoint
git clone -b libadjoint-1.6 https://bitbucket.org/dolfin-adjoint/libadjoint