Skip to content

Commit

Permalink
Merge pull request #31 from precice/dumux-adapter-v2.0.0
Browse files Browse the repository at this point in the history
Release v2.0.0
  • Loading branch information
Fujikawas authored Mar 15, 2024
2 parents 1f8a0e7 + a45ddca commit 54bc59c
Show file tree
Hide file tree
Showing 47 changed files with 913 additions and 1,581 deletions.
4 changes: 2 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Please provide information about the operating system and relevant versions of
the software.
Example:
Ubuntu 20.04 LTS, preCICE 2.3.0, DuMuX 3.4, DuMuX-preCICE 0.1
Ubuntu 22.04 LTS, preCICE 3.0.0, DuMuX 3.7, DuMuX-preCICE 2.0.0
--->

## Steps to reproduce

<!-- Please describe the steps one has to execture to reproduce the problem. --->
<!-- Please describe the steps one has to execute to reproduce the problem. --->

### Expected behavior

Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/build-and-test-dumux-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ jobs:
strategy:
max-parallel: 1
matrix:
precice_version: [2.4.0, 2.5.0]
dune_version: [2.8]
precice_version: [develop]
dune_version: [2.9]
container:
image: precice/dune-precice:${{ matrix.dune_version }}-${{ matrix.precice_version }}
runs-on: ubuntu-latest
steps:
- name: Print python3 version
run: python3 --version
- name: Print python3 version (/usr/bin/env python3)
run: /usr/bin/env python3 --version
- name: Build DuMuX master
run: |
ls -lah
git clone --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git -b master
ls -lah
export DUNE_CONTROL_PATH=${DUNE_CONTROL_PATH}:${PWD}/dumux/dune.module
dunecontrol --opts=/opt/DUMUX/cmake-test.opts --only=dumux all
- name: Check out code
uses: actions/checkout@v3
with:
path: dumux-precice
- name: Build code
run: |
ls -lah
export DUNE_CONTROL_PATH=${PWD}/dumux:${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
echo $DUNE_CONTROL_PATH
dunecontrol --only=dumux-precice --opts=./dumux-precice/test/cmake-test.opts all
cd dumux-precice/build-cmake/
make -j2 build_tests
- name: Run tests
run: |
export DUNE_CONTROL_PATH=${PWD}/dumux:${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
cd dumux-precice/build-cmake/
export PYTHONPATH=${PWD}/dumux/bin/testing:${PYTHONPATH}
CTEST_OUTPUT_ON_FAILURE=1 ctest -j1
- name: Print python3 version
run: python3 --version
- name: Print python3 version (/usr/bin/env python3)
run: /usr/bin/env python3 --version
- name: Build DuMuX master
run: |
ls -lah
git clone --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git -b master
ls -lah
export DUNE_CONTROL_PATH=${DUNE_CONTROL_PATH}:${PWD}/dumux/dune.module
dunecontrol --opts=/opt/DUMUX/cmake-test.opts --only=dumux all
- name: Check out code
uses: actions/checkout@v3
with:
path: dumux-precice
- name: Build code
run: |
ls -lah
export DUNE_CONTROL_PATH=${PWD}/dumux:${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
echo $DUNE_CONTROL_PATH
dunecontrol --only=dumux-precice --opts=./dumux-precice/test/cmake-test.opts all
cd dumux-precice/build-cmake/
make -j2 build_tests
- name: Run tests
run: |
export DUNE_CONTROL_PATH=${PWD}/dumux:${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
cd dumux-precice/build-cmake/
export PYTHONPATH=${PWD}/dumux/bin/testing:${PYTHONPATH}
CTEST_OUTPUT_ON_FAILURE=1 ctest -j1
46 changes: 23 additions & 23 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ jobs:
strategy:
max-parallel: 2
matrix:
dumux_version: [3.4, 3.5]
precice_version: [2.3.0, 2.4.0, 2.5.0]
dumux_version: [3.7, 3.8]
precice_version: [develop]
container:
image: precice/dumux-precice:${{ matrix.dumux_version }}-${{ matrix.precice_version }}
runs-on: ubuntu-latest
steps:
- name: Print python3 version
run: python3 --version
- name: Print python3 version (/usr/bin/env python3)
run: /usr/bin/env python3 --version
- name: Check out code
uses: actions/checkout@v3
with:
path: dumux-precice
- name: Build code
run: |
ls -lah
export DUNE_CONTROL_PATH=${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
echo $DUNE_CONTROL_PATH
dunecontrol --only=dumux-precice --opts=./dumux-precice/test/cmake-test.opts all
cd dumux-precice/build-cmake/
make -j2 build_tests
- name: Run tests
run: |
export DUNE_CONTROL_PATH=${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
cd dumux-precice/build-cmake/
CTEST_OUTPUT_ON_FAILURE=1 ctest -j1
- name: Print python3 version
run: python3 --version
- name: Print python3 version (/usr/bin/env python3)
run: /usr/bin/env python3 --version
- name: Check out code
uses: actions/checkout@v3
with:
path: dumux-precice
- name: Build code
run: |
ls -lah
export DUNE_CONTROL_PATH=${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
echo $DUNE_CONTROL_PATH
dunecontrol --only=dumux-precice --opts=./dumux-precice/test/cmake-test.opts all
cd dumux-precice/build-cmake/
make -j2 build_tests
- name: Run tests
run: |
export DUNE_CONTROL_PATH=${PWD}/dumux-precice:${DUNE_CONTROL_PATH}
cd dumux-precice/build-cmake/
CTEST_OUTPUT_ON_FAILURE=1 ctest -j1
22 changes: 11 additions & 11 deletions .github/workflows/build-docker-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
dockerhub_username: precice
strategy:
matrix:
dumux_version: [3.4, 3.5]
precice_version: [2.3.0, 2.4.0, 2.5.0]
dumux_version: [3.7, 3.8]
precice_version: [develop]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -37,19 +37,19 @@ jobs:
file: "./dockerfile.slim"
tags: ${{ env.dockerhub_username }}/dumux-precice:${{ matrix.dumux_version }}-${{ matrix.precice_version }}
build-args: |
DUNE_VERSION=2.8
PRECICEUBUNTU=focal
DUMUX_VERSION=${{ matrix.dumux_version }}
PRECICE_VERSION=${{ matrix.precice_version }}
DUNEVERSION=2.9
PRECICEUBUNTU=jammy
DUMUXVERSION=${{ matrix.dumux_version }}
PRECICEVERSION=${{ matrix.precice_version }}
build-dune-precice:
name: Builds a Docker container for testing the DuMuX preCICE adapter (DUNE and preCICE)
runs-on: ubuntu-latest
env:
dockerhub_username: precice
strategy:
matrix:
dune_version: [2.8]
precice_version: [2.3.0, 2.4.0, 2.5.0]
dune_version: [2.9]
precice_version: [develop]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -68,6 +68,6 @@ jobs:
file: "./dockerfile_dune-precice.slim"
tags: ${{ env.dockerhub_username }}/dune-precice:${{ matrix.dune_version }}-${{ matrix.precice_version }}
build-args: |
DUNE_VERSION=#{{ matrix.dune_version }}
PRECICEUBUNTU=focal
PRECICE_VERSION=${{ matrix.precice_version }}
DUNEVERSION=${{ matrix.dune_version }}
PRECICEUBUNTU=jammy
PRECICEVERSION=${{ matrix.precice_version }}
6 changes: 3 additions & 3 deletions .github/workflows/style-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.10'
python-version: '3.10.10'
- name: "Install style checker"
run: pip install --user black
run: pip install --user black~=22.12
- name: "Run style check"
run: black --check .
cpp_linting:
Expand All @@ -31,5 +31,5 @@ jobs:
- uses: actions/checkout@v2
- name: Run format check
run: |
sudo apt-get install clang-format-10
sudo apt-get install clang-format-14
./scripts/format/run-clang-format.sh
28 changes: 0 additions & 28 deletions .gitlab/issue_templates/template.md

This file was deleted.

24 changes: 0 additions & 24 deletions .gitlab/merge_request_templates/template.md

This file was deleted.

5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# DuMuX-preCICE change log

## Not released yet
## v2.0.0

- 2023-08-10: Updated the adapter to be compatible with preCICE v3.0.0. Updated the examples too.

## v1.0.0

Expand Down Expand Up @@ -47,6 +49,7 @@
- The configuration of tests has been changed such that it is possible to build all tests using the `build_tests` target.

For details check out the merge request [!18 Restructure repository and tests](https://git.iws.uni-stuttgart.de/dumux-appl/dumux-precice/-/merge_requests/18)

- 2022-01-10: Add license file. The code is licensed under GPLv3 without template exception.
- 2022-01-10: Tests run by the CI on DuMuX `master` are allowed to fail.
- 2022-01-10: Added `CHANGELOG.md` to track changes of the adapter.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif()
#find dune-common and set the module path
find_package(dune-common REQUIRED)
# Find preCICE library
find_package(precice 2 REQUIRED CONFIG)
find_package(precice 3.0.0 REQUIRED CONFIG)

list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
"${PROJECT_SOURCE_DIR}/cmake/modules")
Expand All @@ -24,7 +24,7 @@ include(DuneMacros)
# start a dune project with information from dune.module
dune_project()

dune_enable_all_packages()
dune_enable_all_packages(MODULE_LIBRARIES dumux-precice)

# enforce C++-17
dune_require_cxx_standard(MODULE "DuMuX-preCICE" VERSION 17)
Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![build and test develop](https://github.com/precice/dumux-adapter/actions/workflows/build-and-test.yml/badge.svg)
![build and test develop with DuMuX masters](https://github.com/precice/dumux-adapter/actions/workflows/build-and-test-dumux-master.yml/badge.svg)

This repository provides a [DuMuX](https://dumux.org/)-specific adapter to couple to other codes using [preCICE](https://www.precice.org/). You can find the source code of this adapter [on GitHub](https://github.com/precice/dumux-adapter). The source code of the adapter was formerly stored [in a repository on the IWS GitLab](https://git.iws.uni-stuttgart.de/dumux-appl/dumux-precice).
This repository provides a [DuMuX](https://dumux.org/)-specific adapter to couple to other codes using [preCICE](https://www.precice.org/). The source code of the adapter was formerly stored [in a repository on the IWS GitLab](https://git.iws.uni-stuttgart.de/dumux-appl/dumux-precice).

## Structure of the repository

Expand All @@ -23,13 +23,13 @@ The DuMuX-preCICE adapter is a DUNE module named `dumux-precice` which can be bu

### Prerequisites

- DuMuX **newer** than 3.2
- DuMuX >= than 3.7

- Builds using the current `master` branch of DuMuX might fail.
- If you run into trouble with a new DuMuX release, please open an issue in the repository and add the error message that you receive.
- Needs UMFPack (available via SuiteSparse) as solver for linear systems of equations. This is needed to run the examples included in the adapter. Otherwise you can skip UMFPack.

- preCICE >=2.0.0
- preCICE >=3.0.0

- The adapter is build via the DUNE build system that is based on CMake. Thus, the CMake [link instructions for preCICE](https://precice.org/installation-linking.html#cmake) apply.

Expand All @@ -42,54 +42,54 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen

### Detailed installation steps

1. Install [DuMuX](https://dumux.org/) and the needed dependencies. The easiest way is to follow [DuMuX's installation instructions](https://dumux.org/installation/). The DuMuX project provides a script that installs and DuMuX and the DUNE modules required by DuMuX. This means, after installing DuMuX via the provided script you should be good to go to use the DuMuX-preCICE adapter.
1. Install [DuMuX](https://dumux.org/) and the needed dependencies. The easiest way is to follow [DuMuX's installation instructions](https://dumux.org/docs/doxygen/master/installation.html). The DuMuX project provides a script that installs and DuMuX and the DUNE modules required by DuMuX. This means, after installing DuMuX via the provided script you should be good to go to use the DuMuX-preCICE adapter.

After the installation you should have a root directory that contains the base DUNE modules, i.e. a number of directories named like `dune-common`, `dune-geometry` etc., and a directory called `dumux`.

- Note that extended features of DuMuX or the DuMuX-preCICE adapter may need additional DUNE modules.

2. Download the DuMuX-preCICE adapter to the same directory as the DUNE modules and the `dumux` folder. At the moment there are no adapter releases, besides an outdated `v0.1` release, such the best way is to checkout the `develop` branch of the adapter.
2. Download the DuMuX-preCICE adapter to the same directory as the DUNE modules and the `dumux` folder. It is recommended to use the latest release of the adapter, which can be found by checking out the relevant release tag.

```text
git clone -b develop https://github.com/precice/dumux-adapter.git
git clone -b v2.0.0 https://github.com/precice/dumux-adapter.git
```
You can also try to clone the repository via SSH:
```text
git clone -b develop [email protected]:precice/dumux-adapter.git
git clone -b v2.0.0 [email protected]:precice/dumux-adapter.git
```
3. Verify that the `dumux-precice` folder is in the same directory as the DUNE module folders and the `dumux` folder.
3. Verify that the `dumux-adapter` folder is in the same directory as the DUNE module folders and the `dumux` folder.
4. Build and configure the adapter using `dunecontrol`. While being in the directory mentioned in the previous step via calling
```text
dunecontrol --only=dumux-precice all
./dune-common/bin/dunecontrol --only=dumux-precice all
```
After the build and configure step a new directory `build-cmake` was created inside the `dumux-precice` directory.
After the build and configure step a new directory `build-cmake` was created inside the `dumux-adapter` directory.
You can configure the build and configuration process using advanced options by manipulating CMake variables. `dunecontrol` allows to pass an options file for that
```bash
dunecontrol --opts=OPTSFILE.opts --only=dumux-precice all
./dune-common/bin/dunecontrol --opts=OPTSFILE.opts --only=dumux-precice all
```
There is an `opts`-file provided by the adapter that resides in `test/`. You can use it as
```bash
dunecontrol --opts=dumux-precice/test/cmake-test.opts --only=dumux-precice all
./dune-common/bin/dunecontrol --opts=dumux-precice/test/cmake-test.opts --only=dumux-precice all
```
This provided `cmake-test.opts` file turns off some system-dependent optimizations such that the tests create comparable results on different computers.
For more ways do manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation.
For more ways to manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation.
5. Optional, but recommended: Build all tests to verify the installation. For this navigate in the `build-cmake/` directory and build the `build_tests` target.
```bash
cd dumux-precice/build-cmake
cd dumux-adapter/build-cmake
make -j1 build_tests
```
Expand Down Expand Up @@ -131,4 +131,3 @@ There is no publication related to this code available yet.
### Publications using dumux-precice

- Jaust A., Weishaupt K., Mehl M., Flemisch B. (2020) Partitioned Coupling Schemes for Free-Flow and Porous-Media Applications with Sharp Interfaces. In: Klöfkorn R., Keilegavlen E., Radu F., Fuhrmann J. (eds) Finite Volumes for Complex Applications IX - Methods, Theoretical Aspects, Examples. FVCA 2020. Springer Proceedings in Mathematics & Statistics, vol 323. Springer, Cham. <https://doi.org/10.1007/978-3-030-43651-3_57>
- Code can be found at: <https://git.iws.uni-stuttgart.de/dumux-pub/jaust2020a>
4 changes: 3 additions & 1 deletion doc/user/docs/example-usage.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Adapter usage

Please check out the examples in the `examples/` directory to get an idea on how to use the adapter.
Please check out the examples in the `examples/` directory to get an idea on how to use the adapter.

To use the adapter in a separate DUNE module, call `dune_enable_all_packages()` in the root `CMakeLists.txt` of the application module. If `libdumux-precice` is built as a static library, preCICE needs to be explicitly discovered with `find_package` as done in the root `CMakeLists.txt` of the adapter. To build the adapter library as a dynamic library, use the CMake option `-DBUILD_SHARED_LIBS=ON` to build `dumux-precice` and upstream modules.
Loading

0 comments on commit 54bc59c

Please sign in to comment.