Skip to content

Commit

Permalink
Merge pull request #36 from precice/restructure-docs
Browse files Browse the repository at this point in the history
Restructure the user documentation
MakisH authored Apr 5, 2024
2 parents 53320c4 + 70e0cf0 commit 7d0e017
Showing 29 changed files with 477 additions and 578 deletions.
Original file line number Diff line number Diff line change
@@ -7,13 +7,26 @@ on:
- main

jobs:
markdown_linting:
pre_commit_checks:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run mdl
uses: actionshub/markdownlint@main
- name: Checkout preCICE
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
python_linting:
runs-on: ubuntu-latest
steps:
22 changes: 22 additions & 0 deletions .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Update website
on:
push:
branches:
- 'develop'
paths:
- 'docs/**'
jobs:
trigger:
runs-on: ubuntu-latest
env:
WORKFLOW_FILENAME: update-submodules.yml
steps:
- name: Trigger workflow
run: |
curl \
--request POST \
--url https://api.github.com/repos/precice/precice.github.io/actions/workflows/$WORKFLOW_FILENAME/dispatches \
--header "authorization: token ${{ secrets.WORKFLOW_DISPATCH_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json" \
--data '{"ref":"master"}' \
--fail
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"MD013": false,
"MD033": false,
"MD034": false
}
30 changes: 0 additions & 30 deletions .mdl.rb

This file was deleted.

2 changes: 0 additions & 2 deletions .mdlrc

This file was deleted.

13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
# Official repo for default hooks
- repo: https://github.com/precice/precice-pre-commit-hooks
rev: 'v3.3'
hooks:
- id: format-precice-config
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
exclude: 'CHANGELOG.md|.github/*'
- id: markdownlint-fix
exclude: 'CHANGELOG.md|.github/*'
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ dune_enable_all_packages(MODULE_LIBRARIES dumux-precice)
dune_require_cxx_standard(MODULE "DuMuX-preCICE" VERSION 17)

add_subdirectory(cmake/modules)
add_subdirectory(doc)
add_subdirectory(docs-api)
add_subdirectory(dumux-precice)
add_subdirectory(examples)
add_subdirectory(test EXCLUDE_FROM_ALL)
126 changes: 9 additions & 117 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,129 +5,21 @@

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).

## Documentation

Find the [user documentation on the preCICE website](https://precice.org/adapter-dumux.html).

You can also generate Doxygen documentation of the API from the `docs-api/` directory.

## Structure of the repository

Note that this repository is a [DUNE module](https://www.dune-project.org/) and thus some parts of the repository structure are given by the typical DUNE module layout.

- `cmake/`: Contains CMake modules for building the adapter. Under normal circumstances you do not need
- `examples/`: Contains examples on how to couple different domains. Some of the examples are taken from DuMuX or are slightly adapted from DuMuX test cases or tutorials. Please check the `README.md` file in this directory and corresponding subdirectories to find further explanations of the examples. Additional examples can be found in the `test/` directory.
- `doc/`: Additional documentation.
- `docs/`: User documentation files.
- `docs-api/`: Doxygen-based API documentation configuration files.
- `docker/`: A Docker recipe that creates a container with DUNE, DuMuX and preCICE. The recipe is mainly used for the automated tests. Check the `README.md` in the subdirectory for more details.
- `dumux-precice/`: The preCICE adapter source code and further code for some of the tests and examples.
- `examples/`: Contains examples on how to couple different domains. Some of the examples are taken from DuMuX or are slightly adapted from DuMuX test cases or tutorials. Please check the `README.md` file in this directory and corresponding subdirectories to find further explanations of the examples. Additional examples can be found in the `test/` directory.
- `scripts/`: Contains useful scripts to run simulations and for checking the code's formatting.
- `test/`: Contains test cases and reference solutions (`reference-solutions/`). The directory also contains several DUNE configuration files (`.opts` files) for configuring the project.

## Installation

The DuMuX-preCICE adapter is a DUNE module named `dumux-precice` which can be build using the [DUNE build system](https://www.dune-project.org/doc/installation/). The DUNE build system is build on top of CMake and comes with various tools that make installation and management of DUNE modules easier. Therefore, it is recommended to install `dumux-precice` using `dunecontrol`. Please check out the [DUNE installation instructions](https://www.dune-project.org/doc/installation/) to get an overview over the `dunecontrol` tools and how DUNE modules work.

### Prerequisites

- 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 >=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.

- `wget` or `git` to download the DuMuX-preCICE adapter.
- Optional: [`dune-subgrid`](https://www.dune-project.org/modules/dune-subgrid/) allows for modified grid geometries.
- Optional: [MkDocs](https://www.mkdocs.org/) if one wants to build the user documentation locally. The user documentation can also be found in the `doc/user/docs/` directory and is spread over several Markdown files.
- Optional: [Doxygen](https://www.doxygen.nl/) if one wants to build the API documentation locally.

The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependencies are installed.

### 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/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. 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 v2.0.0 https://github.com/precice/dumux-adapter.git
```
You can also try to clone the repository via SSH:
```text
git clone -b v2.0.0 git@github.com:precice/dumux-adapter.git
```
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
./dune-common/bin/dunecontrol --only=dumux-precice all
```
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
./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
./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 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-adapter/build-cmake
make -j1 build_tests
```
You may speed up the build process by using more than one build job, e.g., use `make -j4` in order to build with for processes at the same time.
Afterwards you can run the tests from the `build-cmake` directory using
```bash
ctest
```
If any tests fails, you should verify if something went wrong with the installation.
There are advanced ways of managing DUNE modules, e.g. using the environment variable `DUNE_CONTROL_PATH`, that are beyond the scope of this short documentation. You can find more information in the [DUNE FAQ](https://www.dune-project.org/doc/installation/#faq).
## Documentation
### User documentation
The main user documentation is currently not available on an online service, but can be found in the `docs/user/docs` directory. Additionally, one may find interesting information in the API documentation (see below) as well as the test and example cases that are provided with this repository. If something is unclear or you would want something to be documented better, please open an [issue](https://github.com/precice/dumux-adapter/issues) and let us know.
### API documentation
The interface of the coupling adapter and also the internal (private) interface are documented using Doxygen. In order to build this documentation you need [Doxygen](https://www.doxygen.nl/index.html) installed. After configuring the project using CMake/`dunecontrol` you can build the documentation via navigating to the `build-cmake` directory and building the `doxygen_dumux-precice` target, i.e.,
```text
cd build-cmake
make doxygen_dumux-precice
```

This generates a HTML documentation which you can view in a browser of your choice. It is stored in `build-cmake/doc/doxygen/index.html`.

## Publications

### How to cite this code

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>
34 changes: 0 additions & 34 deletions doc/user/docs/example-cases.md

This file was deleted.

26 changes: 0 additions & 26 deletions doc/user/docs/index.md

This file was deleted.

87 changes: 0 additions & 87 deletions doc/user/docs/installation.md

This file was deleted.

11 changes: 0 additions & 11 deletions doc/user/docs/overview.md

This file was deleted.

24 changes: 0 additions & 24 deletions doc/user/mkdocs.yml

This file was deleted.

1 change: 0 additions & 1 deletion doc/user/requirements.txt

This file was deleted.

File renamed without changes.
10 changes: 10 additions & 0 deletions docs-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# API documentation

The interface of the coupling adapter and also the internal (private) interface are documented using Doxygen. In order to build this documentation you need [Doxygen](https://www.doxygen.nl/index.html) installed. After configuring the project using CMake/`dunecontrol` you can build the documentation via navigating to the `build-cmake` directory and building the `doxygen_dumux-precice` target, i.e.,

```text
cd build-cmake
make doxygen_dumux-precice
```

This generates a HTML documentation which you can view in a browser of your choice. It is stored in `build-cmake/doc/doxygen/index.html`.
File renamed without changes.
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions docs/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: Get the DuMuX adapter
permalink: adapter-dumux-get.html
keywords: DuMuX, DUNE, C++
summary: Get DuMuX and preCICE, and build the adapter with dunecontrol.
---

The DuMuX-preCICE adapter is a DUNE module named `dumux-precice` which can be build using the [DUNE build system](https://www.dune-project.org/doc/installation/). The DUNE build system is build on top of CMake and comes with various tools that make installation and management of DUNE modules easier. Therefore, it is recommended to install `dumux-precice` using `dunecontrol`. Please check out the [DUNE installation instructions](https://www.dune-project.org/doc/installation/) to get an overview over the `dunecontrol` tools and how DUNE modules work.

## Prerequisites

- DuMuX >= 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 >=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.

- `wget` or `git` to download the DuMuX-preCICE adapter.
- Optional: [`dune-subgrid`](https://www.dune-project.org/modules/dune-subgrid/) allows for modified grid geometries.

The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependencies are installed.

## Get DuMuX

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.

## Get the adapter source

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 v2.0.0 https://github.com/precice/dumux-adapter.git
```

You can also try to clone the repository via SSH:

```text
git clone -b v2.0.0 git@github.com:precice/dumux-adapter.git
```

## Build the adapter

Before you build the adapter, verify that the `dumux-adapter` folder is in the same directory as the DUNE module folders and the `dumux` folder.

Build and configure the adapter using `dunecontrol`. While being in the directory mentioned in the previous step via calling

```text
./dune-common/bin/dunecontrol --only=dumux-precice all
```

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
./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
./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.

To use the adapter in a separate DUNE module, we recommend building the adapter as a shared library. To do so, use the CMake option `-DBUILD_SHARED_LIBS=ON` to build the adapter and upstream modules. The DuMux install script uses `dumux/cmake.opts`, which already sets this option.
Note that to change this setting it may be required to clear the CMake caches in `build-cmake/CMakeCache.txt`.

For more ways to manipulate/adapt the build and configuration step, please consult the `dunecontrol` documentation.

## Build tests (optional)

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-adapter/build-cmake
make -j1 build_tests
```

You may speed up the build process by using more than one build job, e.g., use `make -j4` in order to build with for processes at the same time.

Afterwards you can run the tests from the `build-cmake` directory using

```bash
ctest
```

If any tests fails, you should verify if something went wrong with the installation.

There are advanced ways of managing DUNE modules, e.g. using the environment variable `DUNE_CONTROL_PATH`, that are beyond the scope of this short documentation. You can find more information in the [DUNE FAQ](https://www.dune-project.org/doc/installation/#faq).
22 changes: 22 additions & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: The DuMuX adapter
permalink: adapter-dumux.html
keywords: DuMuX, DUNE, C++
summary: A DuMuX-specific DUNE module for coupling to other codes with preCICE.
---

This is a [DuMuX](https://dumux.org/) adapter (a DUNE module specific to DuMuX) 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).

[Get](adapter-dumux-get.html) and [learn how to use](adapter-dumux-use.html) the adapter.

## Cite

There is no code-specific publication related to the DuMuX adapter available yet.

### Publications using dumux-precice

You may find more examples and related theory in these publications.

- 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>
9 changes: 7 additions & 2 deletions doc/user/docs/example-usage.md → docs/use.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Adapter usage
---
title: Use the DuMuX adapter
permalink: adapter-dumux-use.html
keywords: DuMuX, DUNE, C++
summary: How to use the DuMuX adapter for building your own coupled solver.
---

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/`](https://github.com/precice/dumux-adapter/tree/develop/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.
33 changes: 31 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
# DuMuX-preCICE examples

- `dummysolver/` contains a dummy solver similar to the dummy solver provided by preCICE. However, the included dummy solver uses the DuMuX-preCICE adapter.
- `ff-pm/` contains examples of coupled free flow (`ff`) and porous medium (`pm`) flow
The source code of the DuMuX-preCICE examples can be found in this directory. After the configure and build step of the adapter, the corresponding build scripts etc. can be found in `build-cmake/examples`. This means for modifying the examples one has to edit the files in the `examples/` directory. For building and running the examples one has to go to the corresponding directory in `build-cmake/examples`.

The examples often have two input files that should be passed to the executables:

1. An `.input` file which is a DuMUX input file describing the simulation setting, e.g., pressure, name of output files or mesh size.
2. One or several `.xml` files which describe preCICE's coupling configuration, e.g. mapping types, data acceleration etc. These files are not provided for monolithic test cases since a preCICE configuration is only needed for partitioned couplings.

**Note:** The examples described here are used for testing the correctness of the adapter as well. These tests are defined in the `CMakeLists.txt` file of the examples and relevant scripts and reference data reside in the `test/` subdirectory.

## Free and porous medium flow

All examples of coupling free and porous-medium flow reside in `examples/ff-pm` and corresponding subdirectories in there. We use the abbreviation `ff` for things concerning the free flow and `pm` for things concerning the porous-medium part.

### Flow over a porous-medium

We implemented a simple test case with a pressure driven flow in a free-flow subdomain (top of domain). At the bottom of the free-flow subdomain the subdomain is connected to the porous-medium subdomain. All other boundaries of the porous-medium subdomain are walls (no-flow boundaries).

| | 2D | 3D |
| --- | --- | --- |
| Directory | `examples/flow-over-square-2d` | `examples/flow-over-cube-3d` |
| Name of executable(s) | `ff_flow_over_square_2d` and `pm_flow_over_square_2d`| `ff_flow_over_cube_3d` and `pm_flow_over_cube_3d` |

The 2D test case comes with three preCICE configurations for parallel-implicit coupling (`pi`), serial-implicit coupling (`si`) with either running the flow simulation first (`free-flow-first`) or second (`free-flow-second`). The 3D test case comes with only one preCICE configuration file.

## Dummy solver

The dummy solver reside in `examples/dummysolver`. The solver does not solve any equations, but uses the DuMuX adapter to communicate some data between two instances of the dummy solver. The exchanged data is also checked within the dummy solvers as running the dummy solver is part of test implemented tests.

The dummy solver can be used as an example on how to use the adapter, but also for developing and debugging a new code.

The executable of the dummy solver is called `dumuxprecice_dummysolver` and one can start two instances via the provided `Allrun.sh` script. Please also refer to the `Allrun.sh` script if you are curious on how to start the solver manually. Several typical preCICE dummy solver parameters, such as the solver name or the mesh name are give as run-time parameters via the DuMuX parameter system. These parameters could also be provided by a DuMuX `.input` file instead of using the command line.
86 changes: 50 additions & 36 deletions examples/dummysolver/precice-dummy-solver-config.xml
Original file line number Diff line number Diff line change
@@ -1,66 +1,80 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>

<log>
<sink type="stream" output="stdout" filter= "%Severity% > debug" format="preCICE:%ColorizedSeverity% %Message%" enabled="true" />
<sink
type="stream"
output="stdout"
filter="%Severity% > debug"
format="preCICE:%ColorizedSeverity% %Message%"
enabled="true" />
</log>
<data:scalar name="scalarDataOne" />
<data:scalar name="scalarDataTwo" />

<data:vector name="vectorDataOne" />
<data:vector name="vectorDataTwo" />
<data:scalar name="scalarDataOne" />
<data:scalar name="scalarDataTwo" />
<data:vector name="vectorDataOne" />
<data:vector name="vectorDataTwo" />

<mesh name="MeshOne" dimensions="3">
<use-data name="scalarDataOne" />
<use-data name="scalarDataTwo" />

<use-data name="vectorDataOne" />
<use-data name="vectorDataTwo" />
</mesh>

<mesh name="MeshTwo" dimensions="3">
<use-data name="scalarDataOne" />
<use-data name="scalarDataTwo" />

<use-data name="vectorDataOne" />
<use-data name="vectorDataTwo" />
</mesh>

<participant name="SolverOne">
<provide-mesh name="MeshOne"/>

<provide-mesh name="MeshOne" />
<write-data name="scalarDataOne" mesh="MeshOne" />
<write-data name="vectorDataOne" mesh="MeshOne" />
<read-data name="scalarDataTwo" mesh="MeshOne" />
<read-data name="vectorDataTwo" mesh="MeshOne" />
<read-data name="scalarDataTwo" mesh="MeshOne" />
<read-data name="vectorDataTwo" mesh="MeshOne" />
</participant>

<participant name="SolverTwo">
<receive-mesh name="MeshOne" from="SolverOne"/>
<provide-mesh name="MeshTwo"/>

<mapping:nearest-neighbor direction="write" from="MeshTwo" to="MeshOne" constraint="conservative"/>
<mapping:nearest-neighbor direction="read" from="MeshOne" to="MeshTwo" constraint="consistent" />

<receive-mesh name="MeshOne" from="SolverOne" />
<provide-mesh name="MeshTwo" />
<mapping:nearest-neighbor
direction="write"
from="MeshTwo"
to="MeshOne"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="MeshOne"
to="MeshTwo"
constraint="consistent" />
<write-data name="scalarDataTwo" mesh="MeshTwo" />
<write-data name="vectorDataTwo" mesh="MeshTwo" />
<read-data name="scalarDataOne" mesh="MeshTwo" />
<read-data name="vectorDataOne" mesh="MeshTwo" />
<read-data name="scalarDataOne" mesh="MeshTwo" />
<read-data name="vectorDataOne" mesh="MeshTwo" />
</participant>

<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory="."/>

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />

<exchange data="scalarDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="vectorDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />

<exchange data="scalarDataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" initialize="yes"/>
<exchange data="vectorDataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" initialize="yes"/>
</coupling-scheme:serial-implicit>
<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory="." />

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />
<exchange data="scalarDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="vectorDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange
data="scalarDataTwo"
mesh="MeshOne"
from="SolverTwo"
to="SolverOne"
initialize="yes" />
<exchange
data="vectorDataTwo"
mesh="MeshOne"
from="SolverTwo"
to="SolverOne"
initialize="yes" />
</coupling-scheme:serial-implicit>
</precice-configuration>
45 changes: 28 additions & 17 deletions examples/dummysolver/test.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>

<log>
<sink type="stream" output="stdout" filter= "%Severity% > debug" format="preCICE:%ColorizedSeverity% %Message%" enabled="true" />
<sink
type="stream"
output="stdout"
filter="%Severity% > debug"
format="preCICE:%ColorizedSeverity% %Message%"
enabled="true" />
</log>

<data:vector name="dataOne" />
<data:vector name="dataTwo" />
<data:vector name="dataOne" />
<data:vector name="dataTwo" />

<mesh name="MeshOne" dimensions="3">
<use-data name="dataOne" />
@@ -20,29 +23,37 @@
</mesh>

<participant name="SolverOne">
<provide-mesh name="MeshOne"/>
<provide-mesh name="MeshOne" />
<write-data name="dataOne" mesh="MeshOne" />
<read-data name="dataTwo" mesh="MeshOne" />
<read-data name="dataTwo" mesh="MeshOne" />
</participant>

<participant name="SolverTwo">
<receive-mesh name="MeshOne" from="SolverOne"/>
<provide-mesh name="MeshTwo"/>
<mapping:nearest-neighbor direction="write" from="MeshTwo" to="MeshOne" constraint="conservative"/>
<mapping:nearest-neighbor direction="read" from="MeshOne" to="MeshTwo" constraint="consistent" />
<receive-mesh name="MeshOne" from="SolverOne" />
<provide-mesh name="MeshTwo" />
<mapping:nearest-neighbor
direction="write"
from="MeshTwo"
to="MeshOne"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="MeshOne"
to="MeshTwo"
constraint="consistent" />
<write-data name="dataTwo" mesh="MeshTwo" />
<read-data name="dataOne" mesh="MeshTwo" />
<read-data name="dataOne" mesh="MeshTwo" />
</participant>

<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory=".."/>
<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory=".." />

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />
<min-iteration-convergence-measure min-iterations="5" data="dataOne" mesh="MeshOne"/>
<min-iteration-convergence-measure min-iterations="5" data="dataOne" mesh="MeshOne" />
<exchange data="dataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="dataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne"/>
<exchange data="dataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" />
</coupling-scheme:serial-implicit>
</precice-configuration>
82 changes: 39 additions & 43 deletions examples/ff-pm/flow-over-cube-3d/precice-config.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<log>
<sink type="stream" output="stdout" filter= "(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)" enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)"
enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
</log>


<data:scalar name="Velocity"/>
<data:scalar name="Pressure"/>
<data:scalar name="Velocity" />
<data:scalar name="Pressure" />

<mesh name="FreeFlowMesh" dimensions="3">
<use-data name="Velocity" />
@@ -21,54 +23,48 @@
</mesh>

<participant name="FreeFlow">
<provide-mesh name="FreeFlowMesh"/>
<receive-mesh name="DarcyMesh" from="Darcy"/>

<read-data name="Velocity" mesh="FreeFlowMesh"/>
<write-data name="Pressure" mesh="FreeFlowMesh"/>

<mapping:nearest-neighbor direction="write" from="FreeFlowMesh" to="DarcyMesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="DarcyMesh" to="FreeFlowMesh" constraint="consistent"/>
<provide-mesh name="FreeFlowMesh" />
<receive-mesh name="DarcyMesh" from="Darcy" />
<read-data name="Velocity" mesh="FreeFlowMesh" />
<write-data name="Pressure" mesh="FreeFlowMesh" />
<mapping:nearest-neighbor
direction="write"
from="FreeFlowMesh"
to="DarcyMesh"
constraint="consistent" />
<mapping:nearest-neighbor
direction="read"
from="DarcyMesh"
to="FreeFlowMesh"
constraint="consistent" />
</participant>

<participant name="Darcy">
<provide-mesh name="DarcyMesh"/>

<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
<provide-mesh name="DarcyMesh" />
<read-data name="Pressure" mesh="DarcyMesh" />
<write-data name="Velocity" mesh="DarcyMesh" />
</participant>

<m2n:sockets acceptor="FreeFlow" connector="Darcy" network="lo" />


<coupling-scheme:serial-implicit>
<max-time value="1"/>
<max-time value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>


<participants first="FreeFlow" second="Darcy"/>
<max-iterations value="100" />
<participants first="FreeFlow" second="Darcy" />
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="false" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="true" />

<relative-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh"/>


<!--
<relative-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh" />
<relative-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh" />
<!--
<relative-convergence-measure limit="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</precice-configuration>

90 changes: 42 additions & 48 deletions examples/ff-pm/flow-over-square-2d/precice-config-pi.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<log>
<sink type="stream" output="stdout" filter= "(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)" enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)"
enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
</log>


<data:scalar name="Velocity"/>
<data:scalar name="Pressure"/>
<data:scalar name="Velocity" />
<data:scalar name="Pressure" />

<mesh name="FreeFlowMesh" dimensions="2">
<use-data name="Velocity" />
@@ -21,60 +23,52 @@
</mesh>

<participant name="FreeFlow">
<provide-mesh name="FreeFlowMesh"/>
<receive-mesh name="DarcyMesh" from="Darcy"/>

<read-data name="Velocity" mesh="FreeFlowMesh"/>
<write-data name="Pressure" mesh="FreeFlowMesh"/>

<mapping:nearest-neighbor direction="write" from="FreeFlowMesh" to="DarcyMesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="DarcyMesh" to="FreeFlowMesh" constraint="consistent"/>

<provide-mesh name="FreeFlowMesh" />
<receive-mesh name="DarcyMesh" from="Darcy" />
<read-data name="Velocity" mesh="FreeFlowMesh" />
<write-data name="Pressure" mesh="FreeFlowMesh" />
<mapping:nearest-neighbor
direction="write"
from="FreeFlowMesh"
to="DarcyMesh"
constraint="consistent" />
<mapping:nearest-neighbor
direction="read"
from="DarcyMesh"
to="FreeFlowMesh"
constraint="consistent" />
</participant>

<participant name="Darcy">
<provide-mesh name="DarcyMesh" />

<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
<read-data name="Pressure" mesh="DarcyMesh" />
<write-data name="Velocity" mesh="DarcyMesh" />
</participant>

<m2n:sockets acceptor="FreeFlow" connector="Darcy" network="lo" />


<coupling-scheme:parallel-implicit>
<max-time value="1"/>
<max-time value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>


<participants first="FreeFlow" second="Darcy"/>
<max-iterations value="100" />
<participants first="FreeFlow" second="Darcy" />
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="false" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="true" />

<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh"/>

<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh"/>
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh"/>


<!--
<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh" />
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh" />
<!--
<relative-convergence-measure limit="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>
</coupling-scheme:parallel-implicit>
</precice-configuration>

Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<log>
<sink type="stream" output="stdout" filter= "(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)" enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)"
enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
</log>

<data:scalar name="Velocity" />
<data:scalar name="Pressure" />

<data:scalar name="Velocity"/>
<data:scalar name="Pressure"/>

<mesh name="FreeFlowMesh" dimensions="2">
<mesh name="FreeFlowMesh" dimensions="2">
<use-data name="Velocity" />
<use-data name="Pressure" />
</mesh>
@@ -22,58 +24,50 @@

<participant name="FreeFlow">
<provide-mesh name="FreeFlowMesh" />
<receive-mesh name="DarcyMesh" from="Darcy"/>

<read-data name="Velocity" mesh="FreeFlowMesh"/>
<write-data name="Pressure" mesh="FreeFlowMesh"/>

<mapping:nearest-neighbor direction="write" from="FreeFlowMesh" to="DarcyMesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="DarcyMesh" to="FreeFlowMesh" constraint="consistent"/>

<receive-mesh name="DarcyMesh" from="Darcy" />
<read-data name="Velocity" mesh="FreeFlowMesh" />
<write-data name="Pressure" mesh="FreeFlowMesh" />
<mapping:nearest-neighbor
direction="write"
from="FreeFlowMesh"
to="DarcyMesh"
constraint="consistent" />
<mapping:nearest-neighbor
direction="read"
from="DarcyMesh"
to="FreeFlowMesh"
constraint="consistent" />
</participant>

<participant name="Darcy">
<provide-mesh name="DarcyMesh" />

<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
<read-data name="Pressure" mesh="DarcyMesh" />
<write-data name="Velocity" mesh="DarcyMesh" />
</participant>

<m2n:sockets acceptor="FreeFlow" connector="Darcy" network="lo" />


<coupling-scheme:serial-implicit>
<max-time value="1"/>
<max-time value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>


<participants first="FreeFlow" second="Darcy"/>
<max-iterations value="100" />
<participants first="FreeFlow" second="Darcy" />
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="false" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="true" />

<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh"/>

<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh"/>
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh"/>


<!--
<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh" />
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh" />
<!--
<relative-convergence-measure limit="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</precice-configuration>

Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<log>
<sink type="stream" output="stdout" filter= "(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)" enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)"
enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
</log>

<data:scalar name="Velocity"/>
<data:scalar name="Pressure"/>
<data:scalar name="Velocity" />
<data:scalar name="Pressure" />

<mesh name="FreeFlowMesh" dimensions="2">
<use-data name="Velocity" />
@@ -21,58 +24,50 @@

<participant name="FreeFlow">
<provide-mesh name="FreeFlowMesh" />
<receive-mesh name="DarcyMesh" from="Darcy"/>

<read-data name="Velocity" mesh="FreeFlowMesh"/>
<write-data name="Pressure" mesh="FreeFlowMesh"/>

<mapping:nearest-neighbor direction="write" from="FreeFlowMesh" to="DarcyMesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="DarcyMesh" to="FreeFlowMesh" constraint="consistent"/>

<receive-mesh name="DarcyMesh" from="Darcy" />
<read-data name="Velocity" mesh="FreeFlowMesh" />
<write-data name="Pressure" mesh="FreeFlowMesh" />
<mapping:nearest-neighbor
direction="write"
from="FreeFlowMesh"
to="DarcyMesh"
constraint="consistent" />
<mapping:nearest-neighbor
direction="read"
from="DarcyMesh"
to="FreeFlowMesh"
constraint="consistent" />
</participant>

<participant name="Darcy">
<provide-mesh name="DarcyMesh" />

<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
<read-data name="Pressure" mesh="DarcyMesh" />
<write-data name="Velocity" mesh="DarcyMesh" />
</participant>

<m2n:sockets acceptor="FreeFlow" connector="Darcy" network="lo" />


<coupling-scheme:serial-implicit>
<max-time value="1"/>
<max-time value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>


<participants first="Darcy" second="FreeFlow"/>
<max-iterations value="100" />
<participants first="Darcy" second="FreeFlow" />
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="true" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="false" />

<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh"/>

<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh"/>
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh"/>


<!--
<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh" />
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh" />
<absolute-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh" />
<!--
<relative-convergence-measure limit="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<preconditioner type="residual-sum" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</precice-configuration>

0 comments on commit 7d0e017

Please sign in to comment.