Skip to content
Snippets Groups Projects
Commit c11f1478 authored by Ivan Buntic's avatar Ivan Buntic
Browse files

[problem] Improve slides.

parent 145498a4
No related branches found
No related tags found
1 merge request!240[problem] Improve slides.
Pipeline #46175 waiting for manual action
...@@ -4,6 +4,10 @@ title: DuMu^x^ applications ...@@ -4,6 +4,10 @@ title: DuMu^x^ applications
# Example application # Example application
## Simulation goal
<img style="float: right;" src="../exercises/extradoc/exercise1_setup.png">
## Gas injection / immiscible two phase flow ## Gas injection / immiscible two phase flow
Mass balance equations for two fluid phases: Mass balance equations for two fluid phases:
...@@ -369,6 +373,7 @@ See [Part I: Runtime parameters](./params.html) for details. ...@@ -369,6 +373,7 @@ See [Part I: Runtime parameters](./params.html) for details.
## Main program ## Main program
* Each problem has one main file (`test_name.cc` or `main.cc`) * Each problem has one main file (`test_name.cc` or `main.cc`)
* Here: `2pmain.cc` and `2p2cmain.cc`
* Contains the `main` function (mandatory in C/C++ programs) * Contains the `main` function (mandatory in C/C++ programs)
## Main function ## Main function
...@@ -660,6 +665,11 @@ But you can of course "install" Dune modules and DuMu^x^. ...@@ -660,6 +665,11 @@ But you can of course "install" Dune modules and DuMu^x^.
## Build system - dunecontrol ## Build system - dunecontrol
* For Dune, CMake is triggered via the `dunecontrol` script
```sh
./dune-common/bin/dunecontrol [options] <command>
```
* useful options: * useful options:
- `--opts=<optionfile.opts>` specify e.g. compiler flags; DuMu^x^ provides [`dumux/cmake.opts`](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/cmake.opts). - `--opts=<optionfile.opts>` specify e.g. compiler flags; DuMu^x^ provides [`dumux/cmake.opts`](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/cmake.opts).
- `--build-dir=<build directory>` specify path for out-of-source build; Default: every module contains its own build directory called `build-cmake/` - `--build-dir=<build directory>` specify path for out-of-source build; Default: every module contains its own build directory called `build-cmake/`
...@@ -688,20 +698,17 @@ removes the `CMake` cache files from all Dune modules. ...@@ -688,20 +698,17 @@ removes the `CMake` cache files from all Dune modules.
## Build system ## Build system
`CMakeLists.txt` for an example application: create a test target `test_2p_incompressible_box` `CMakeLists.txt` for an example application: create a test target `exercise_basic_2p`
by defining name, source file and command line arguments: by defining a name and source file:
```cmake ```cmake
dumux_add_test( dumux_add_test(NAME exercise_basic_2p
NAME test_2p_incompressible_box SOURCES 2pmain.cc)
SOURCES test_2p_fv.cc
CMD_ARGS test_2p.input
)
``` ```
## Build system ## Build system
Add extra compile definitions and commands (typical Another example: add extra compile definitions and commands (typical
for DuMu^x^ regression tests): for DuMu^x^ regression tests):
```cmake ```cmake
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment