-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from precice/restructure-docs
Restructure the user documentation
Showing
29 changed files
with
477 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"MD013": false, | ||
"MD033": false, | ||
"MD034": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters