Quick start with Docker#
Attention
Please install Docker to follow the quick start procedure. You may use a drop-in replacement such as podman, too.
Step 1: Enter the Docker container#
Open a terminal and pull the tandem-env image:
$ docker pull uphoffc/tandem-env
Activate the Docker container with
$ docker run -it -v $(pwd):/home -u $(id -u):$(id -g) uphoffc/tandem-env
You should now see something like
I have no name!@<random string>:/home$
Note
In the docker run command, the option -it
opens an interactive terminal,
-v $(pwd):/home
maps your current working directory to the home folder
inside the container, and -u $(id -u):$(id -g)
fixes the file permissions
for files you create inside the container.
Step 2: Compile tandem#
Inside the Docker container, clone the tandem repository and load submodules:
$ git clone https://github.com/TEAR-ERC/tandem.git
$ cd tandem/
$ git submodule update --init
Tandem uses CMake, which is contained in the Docker image. We do not run CMake from the tandem directory but create a build directory to not pollute our workspace. From the build directory we run CMake followed by make:
$ mkdir build
$ cd build
$ cmake .. -DPOLYNOMIAL_DEGREE=6
$ make -j
Note that we specified the polynomial degree of the finite element spaces
with the POLYNOMIAL_DEGREE
variable.
Another important variable is DOMAIN_DIMENSION
, which should be set
to 2 or 3, depending on whether you want to run 2D or 3D models.
You can also use ccmake ..
to enter a GUI which shows all available
compilation variables.
Step 3: Run tests#
To check that everything works, run
$ make test
from the build folder. At the end of the tests, you should see
100% tests passed, 0 tests failed out of 21
You are now set to run the examples.