Installing dolfin-adjoint

Note: If you are looking to install the (deprecated) dolfin-adjoint/libadjoint library, visit the dolfin-adjoint/libadjoint webpage.

What is the difference between dolfin-adjoint/pyadjoint and dolfin-adjoint/libadjoint?

Source code

The source code of pyadjoint is available on

Docker images (all platforms)

Docker allows us to build and ship consistent high-performance dolfin-adjoint installations with FEniCS 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 | bash

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

Stable version:

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 run

A Jupyter notebook instance with a user defined name (here myproject) can be started with:

fenicsproject notebook myproject
fenicsproject start myproject

The FEniCS Docker script can also be used to create persistent sessions:

fenicsproject create myproject
fenicsproject start myproject

To create a session that has access to the current folder from the host:

docker run -ti -v $(pwd):/home/fenics/shared

Development version:

The development version of dolfin-adjoint and FEniCS is available with:

fenicsproject run

To update the development container, run:

fenicsproject pull

To see all the options run:

fenicsproject help

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