Skip to content
Snippets Groups Projects
Commit 0bc3b8fa authored by Hamza Oukili's avatar Hamza Oukili Committed by Leon Keim
Browse files

[exercise][dunemodule] update Readme and Exercise patch

parent 1ba838c4
No related branches found
No related tags found
1 merge request!251Merge branch 'doc-dunemodule' into 'master'
diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-dunemodule/README.md
--- exercises/exercise-dunemodule/README.md 2024-05-21 14:15:07.145554774 +0200
--- exercises/exercise-dunemodule/README.md 2024-07-15 15:50:06.499877396 +0200
+++ exercises/solution/exercise-dunemodule/README.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,108 +0,0 @@
@@ -1,114 +0,0 @@
-# Exercise New Dune Module (DuMuX course)
-
-This exercise describes how to create a new DuMuX module
......@@ -11,7 +11,6 @@ diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-du
-workflow to develop code on top of DuMuX.
-
-### Task 1: Create new dune module
-<hr>
-
-* Execute the following command (bash environment) in the top-folder, i.e. above the dumux folder
-
......@@ -25,21 +24,18 @@ diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-du
- * a version at your choice (the version of your project, not of dumux.)
- * your email address
-
-<br><br><br>
-
-### Task 2: Rerun dunecontrol to configure your new project
-<hr>
-
-The following command will configure your new module
-
-```bash
-./dune-common/bin/dunecontrol --opts=<opts file> --only=dumux-example all
-./dune-common/bin/dunecontrol --opts=dumux/cmake.opts --only=<module-name> all
-```
-
-You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<opts file>` needs to be replaced (please replace the angle brackets also) by an options file, e.g., by `./dumux/cmake.opts`. Have a look at the comments in this file to see how you can adapt it to your needs.
-You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<module-name>` needs to be replaced (please replace the angle brackets also) by the name of the module, e.g., by `dumux-example`.
-
-<br><br><br>
-### Task 3: Create a new test case within your new DuMuX module
-<hr>
-
-* Create a new folder (in your module folder), e.g., `appl`
-
......@@ -81,9 +77,9 @@ diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-du
-./test_1p_compressible_stationary_tpfa params.input
-```
-
-<br><br><br>
-
-### Task 4: Create a new GitLab project
-<hr>
-
-
-* Login with your username and password at https://git.iws.uni-stuttgart.de/
-
......@@ -96,17 +92,28 @@ diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-du
-
-* Then choose to **Create blank project**.
-
-* Specify your project name, untick the box *Initialize repository with a README* and click the **Create project** button.
-* Specify your project name, e.g., <module-name>, untick the box *Initialize repository with a README* and click the **Create project** button.
-
-* Follow the given instructions for an *existing folder*.
-
-Hint: if you have not done so already, be sure to inform your computer of your git account with the following commands:
-```bash
-cd <module-name>
-git config --global user.name "FIRST_NAME LAST_NAME"
-git config --global user.email "YOUR_EMAIL_ADDRESS"
-git init --initial-branch=main
-git remote add origin https://git.iws.uni-stuttgart.de/<Namespace>/<module-name>.git
-```
-
-**Important**: Before executing the `git add .` command, you should add your cmake build folder to `.gitignore`.
-The easiest way to do so is to copy the `.gitignore` file from the dumux module into your module path. If everything
-worked, executing `git status` should not show `build-cmake` anymore. Never put your executables or other build files
-under version control. Only source files (`*.hh`, `*.cc`, `*.input`, `CMakeLists.txt`) should be under version control.
-
-Then you can commit and push your new module to your repository:
-```bash
-git add .
-git commit -m "Initial commit"
-git push -u origin main
-```
\ No newline at end of file
......@@ -7,7 +7,6 @@ This is the suggested
workflow to develop code on top of DuMuX.
### Task 1: Create new dune module
<hr>
* Execute the following command (bash environment) in the top-folder, i.e. above the dumux folder
......@@ -21,21 +20,18 @@ workflow to develop code on top of DuMuX.
* a version at your choice (the version of your project, not of dumux.)
* your email address
<br><br><br>
### Task 2: Rerun dunecontrol to configure your new project
<hr>
The following command will configure your new module
```bash
./dune-common/bin/dunecontrol --opts=<opts file> --only=dumux-example all
./dune-common/bin/dunecontrol --opts=dumux/cmake.opts --only=<module-name> all
```
You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<opts file>` needs to be replaced (please replace the angle brackets also) by an options file, e.g., by `./dumux/cmake.opts`. Have a look at the comments in this file to see how you can adapt it to your needs.
You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<module-name>` needs to be replaced (please replace the angle brackets also) by the name of the module, e.g., by `dumux-example`.
<br><br><br>
### Task 3: Create a new test case within your new DuMuX module
<hr>
* Create a new folder (in your module folder), e.g., `appl`
......@@ -77,9 +73,9 @@ cd appl
./test_1p_compressible_stationary_tpfa params.input
```
<br><br><br>
### Task 4: Create a new GitLab project
<hr>
* Login with your username and password at https://git.iws.uni-stuttgart.de/
......@@ -92,17 +88,27 @@ your own project.
* Then choose to **Create blank project**.
* Specify your project name, untick the box *Initialize repository with a README* and click the **Create project** button.
* Specify your project name, e.g., <module-name>, untick the box *Initialize repository with a README* and click the **Create project** button.
* Follow the given instructions for an *existing folder*.
Hint: if you have not done so already, be sure to inform your computer of your git account with the following commands:
```bash
cd <module-name>
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "YOUR_EMAIL_ADDRESS"
git init --initial-branch=main
git remote add origin https://git.iws.uni-stuttgart.de/<Namespace>/<module-name>.git
```
**Important**: Before executing the `git add .` command, you should add your cmake build folder to `.gitignore`.
The easiest way to do so is to copy the `.gitignore` file from the dumux module into your module path. If everything
worked, executing `git status` should not show `build-cmake` anymore. Never put your executables or other build files
under version control. Only source files (`*.hh`, `*.cc`, `*.input`, `CMakeLists.txt`) should be under version control.
Then you can commit and push your new module to your repository:
```bash
git add .
git commit -m "Initial commit"
git push -u origin main
```
\ No newline at end of file
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