Skip to content

Building

Frédéric Simonis edited this page Nov 27, 2019 · 23 revisions

To build the adapter, follow the steps below:

  1. Download and compile deal.II (version 9.1 is known to work). A detailed installation instruction is given in the installation section of the deal.II webpage. If you are familiar with CMake and want to stay in sync with the recent development version, you can clone directly the git repository and follow the steps in the README there.

  2. Download and compile preCICE. A detailed installation instruction is given in the building section of the preCICE wiki. On debian-like systems, you could directly download and install debian packages.

  3. Build the dealii-adapter: First, clone the git repository

    git clone --branch=master https://github.com/precice/dealii-adapter.git .
    

    Omit the --branch=master if you selected the develop version in step2.
    Building is similar to the example programs, run

    cmake -DDEAL_II_DIR=/path/to/deal.II .

    for configuration, where DEAL_II_DIR points to your installation (not source) directory. This should be the same as the CMAKE_INSTALL_PREFIX you used when installing deal.II. If you have set the variable DEAL_II_DIR globally, you could skip it in the command above. Afterwards, run make to build the adapter. By default, the adapter is built with a 2D example in debug mode. If you want to build a release version, use make release. If you want to run a 3D example (quasi 2D, meaning the out-of-plane direction is clamped, but we use real cells for the calculation), you can define this using cmake:

    cmake -DDEAL_II_DIR=/path/to/deal.II -DDIM=3 .

Note that you need to run make distclean if you switch from one to another dimension in order to overwrite the dimension value.

To run the deal.II adapter, copy the executable and parameter file (parameters.prm) in your target directory, e.g. Solid. Afterwards, create an output directory called dealii_output, where this programs stores its simulation result files, and run the executable by:

./coupled_elasto_dynamics path/to/parameters.prm

Example cases can be found in the tutorial cases for deal.II coupled with OpenFOAM.

Clone this wiki locally