Skip to content
Snippets Groups Projects
dunemodule.md 1.39 KiB
Newer Older
---
title: Making my own Dune-Module
---

# Custom Dune-Module

## My own workspace?

We all want to implement our own models and create our own test cases.

But where?

## The Dune/Dumux Suite
IvBu's avatar
IvBu committed
<img src=img/dependenciesCore.png width="100%">
IvBu's avatar
IvBu committed
## The Dune/Dumux Suite
<img src=img/dependenciesOptional.png width="100%">

## The Dune/Dumux Suite
<img src=img/dependenciesMyModule.png width="100%">
## Creating a new dune module
Start the script `duneproject` to initiate creating a new module:
./dune-common/bin/duneproject
## How are these modules linked?
Compile modules via:
IvBu's avatar
IvBu committed

```bash
./dune-common/bin/dunecontrol --opts=dumux/cmake.opts all
## Adding test cases to an `appl` folder

IvBu's avatar
IvBu committed
- Adjust the
    - source (.cc) file,
    - input parameter file,
    - problem file,
    - properties file,
    - (spatialparams file).
- Adjust the `CMakeLists.txt` file.
- Reconfigure your module.
IvBu's avatar
IvBu committed
## Pushing an existing folder to an empty git repository

```bash
cd my-module-folder
git init --initial-branch=main
git remote add origin https://git.iws.uni-stuttgart.de/Namespace/my-module.git
git add .
git commit -m "Initial commit"
git push -u origin main
```
IvBu's avatar
IvBu committed
## [Exercises](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/tree/master/exercises/exercise-dunemodule):

- Create a new module with the duneproject script
- Run dune control
- Create an appl folder
- Upload to a git repository