Commit 91e26287 authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos

Merge branch 'master' into cookbook-solute-transport-in-homogeneous-medium

parents f23caac1 67d678fd
......@@ -4,7 +4,8 @@ build-cmake/
# Exclude generated files
doc/manual/config-file.rst
doc/default_files/config.ini
doc/cookbook/tutorial-*/config.ini
doc/cookbook/1-infiltration-sand/config.ini
doc/cookbook/7-solute-transport/config.ini
python/dorie/wrapper/pf_from_file.py
python/dorie/wrapper/test_dorie.py
python/dorie/dorie/cli/cmds.py
......
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
DUNE_DIR: /opt/dune
DUNE_CONTROL_PATH: $DUNE_DIR:$CI_PROJECT_DIR
DUNECONTROL: ./dune-common/bin/dunecontrol
CPUS_MULTICORE: 4
CPUS_DIND: 2
......@@ -30,8 +31,9 @@ variables:
image: $DUNE_ENV_IMAGE
# Move into top-level DUNE directory
before_script:
- cd /opt/dune
- cd $DUNE_DIR
# Provide SSH access via the SSH_PRIVATE_KEY and SSH_KNOWN_HOSTS variables
.ssh-access: &ssh_access
......@@ -123,7 +125,7 @@ prep:update-dune-clang:
build:system-tests: &build-tests
stage: build
script:
- CMAKE_FLAGS="$CMAKE_FLAGS"
- CMAKE_FLAGS="$CMAKE_FLAGS -DCOVERAGE_REPORT=On"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_system_tests
......@@ -136,20 +138,22 @@ build:system-tests: &build-tests
build:unit-tests:
<<: *build-tests
script:
- CMAKE_FLAGS="$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug"
- CMAKE_FLAGS="$CMAKE_FLAGS -DCOVERAGE_REPORT=On
-DCMAKE_BUILD_TYPE=None"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
build:debug: &debug
stage: build
allow_failure: true
script:
before_script:
- cd $DUNE_DIR
- CMAKE_FLAGS="
$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
script:
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS richards_d2_r1 transport_d2_r0_t0
......@@ -157,7 +161,9 @@ build:debug: &debug
build:debug-clang:
<<: *debug
image: ${DUNE_ENV_IMAGE}-clang
script:
before_script:
- cd $DUNE_DIR
# Choose Clang compiler explicitly
- CMAKE_FLAGS="
$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug
......@@ -165,9 +171,6 @@ build:debug-clang:
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS transport_d2_r0_t0 transport_d2_r1_t0
build:docs:
stage: build
......@@ -186,50 +189,53 @@ test:system-tests: &test
stage: test
dependencies:
- build:system-tests
needs: ["build:system-tests"]
variables:
GCOVR_PATHS:
--root $CI_PROJECT_DIR
--exclude $CI_PROJECT_DIR/dune/dorie/test
--exclude $CI_PROJECT_DIR/plugins
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make system_tests
# Run coverage utility (will also run after failed job)
after_script:
- source $CI_PROJECT_DIR/build-cmake/activate
- pip3 install gcovr
- cd $CI_PROJECT_DIR/build-cmake
- mkdir coverage
- gcovr $GCOVR_PATHS --html --html-details -o coverage/report.html
# run again for coverage report in GitLab
- gcovr $GCOVR_PATHS
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/test
- $CI_PROJECT_DIR/build-cmake/coverage
expire_in: 1 day
test:unit-tests:
<<: *test
dependencies:
- build:unit-tests
needs: ["build:unit-tests"]
script:
# install coverage reporter
- $DUNECONTROL --only=dorie bexec
"./run-in-dune-env python3 -m pip install gcovr"
# perform the tests
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make unit_tests
# report coverage
- cd $CI_PROJECT_DIR/build-cmake
- mkdir -p dune/dorie/test/coverage
- ./run-in-dune-env gcovr
--root ../
--exclude ../dune/dorie/test
--exclude ../plugins
--html --html-details
-o dune/dorie/test/coverage/coverage.html
# run again for coverage report in GitLab
- ./run-in-dune-env gcovr
--root ../
--exclude ../dune/dorie/test
--exclude ../plugins
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/dune/dorie/test
- $CI_PROJECT_DIR/build-cmake/coverage
expire_in: 1 day
test:python-tests:
<<: *test
dependencies: []
# TODO: Make empty once https://gitlab.com/gitlab-org/gitlab/issues/30631
# is resolved
needs: ["build:docs"] # Any quick job from previous stage
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_python
......
(One-sentence description of what kind of bug you would like to report)
_One-sentence description of what kind of bug you would like to report_
#### Summary
(Summarise the encountered bug concisely)
### Summary
_Summarise the encountered bug concisely_
#### Steps to reproduce
(How can this be reproduced? If you can, point to specific files/configurations where the bug occurs)
### Steps to reproduce
_How can this be reproduced? If you can, point to specific files/configurations where the bug occurs_
#### What is the current _bug_ behaviour?
(More about the behaviour of the bug)
### What is the current _bug_ behaviour?
_More about the behaviour of the bug_
#### What is the expected _correct_ behaviour?
(Which behaviour would you have expected?)
### What is the expected _correct_ behaviour?
_Which behaviour would you have expected?_
#### Relevant logs, screenshots, files...?
(Anything that helps reproducing the bug)
### Relevant logs, screenshots, files...?
_Anything that helps reproducing the bug_
<!-- Put very long log outputs within the <pre></pre> tags below -->
<!-- If this doesn't apply, delete the whole <details></details> block -->
......@@ -28,8 +28,21 @@
</pre>
</details>
#### Reproducing input
_Do you have input files reproducing the problem? Insert them here:_
#### Ideas how to fix this?
(Add them here, if you have any.)
| Input data | |
| - | - |
| Simulation Case | _Description goes here_ |
| PFG config file | _if any_ |
| Grid mapping file | _if any_ |
| GMSH grid file | _if any_ |
| Boundary Condition file | |
| Parameterization file | |
| Run config file | |
/label ~bug
\ No newline at end of file
### Ideas how to fix this?
_Add them here, if you have any._
/label ~Bug
<!-- _Set the title to: "Patch Release: X.Y.Z" -->
<!-- Replace X.Y.Z with the actual version numbers everywhere -->
We're releasing patch version `X.Y.Z` for branch `X.Y-stable`! :tada:
### 1 — List of MRs to be Included
List the MRs and the commit SHA of their respective merge commits here.
Placing them in chronological order here ensures fewer issues when
cherry-picking them!
The MRs are indicated by the ~"Pick into X.Y" label.
| MR | Merge Commit SHA |
| -- | ---------------- |
| ! | ... |
### 2 — On GitLab
Use the "patch-release" template for creating a new Merge Request.
- [ ] [Create a branch][new branch] `X.Y-patch` from `X.Y-stable`
- [ ] [Create a Merge Request][new mr] with source branch `X.Y-patch` and
target branch `X.Y-stable`: !
- [ ] Merge this MR: !
- [ ] [Create tag][new tag] `X.Y.Z` from branch `X.Y-stable`
- Message:
```
Version X.Y.Z (YYYY-MM-DD)
```
- Release Notes:
```
# Version X.Y.Z (YYYY-MM-DD)
-> Copy appropriate entries from MR changelog here <-
```
- [ ] Update "Release" [project badge][badge] <!-- only if applicable -->
### 3 — On Docker Hub
- [ ] Update [description on DockerHub][DockerHub description]
- [ ] Push new `latest` tag to DockerHub <!-- only if applicable -->
### 4 — All done? :white_check_mark:
Close this issue!
/label ~Release
[new branch]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/branches/new
[new mr]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/merge_requests/new
[new tag]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/tags/new
[DockerHub description]: https://hub.docker.com/r/dorie/dorie
[badge]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/edit
......@@ -8,7 +8,7 @@
### Related issues
See #...
See #
<!--
PLEASE READ THIS
......
<!-- _Set the title to: "Release: X.Y.0" -->
<!-- Replace X.Y with the actual version numbers everywhere -->
We're rolling out version `X.Y.0`! :tada:
### 1 — In the Code
- [ ] `master`: Update version numbers in `VERSION`, `CHANGELOG.md`,
`dune.module` to `X.Y.0`.
- [ ] `master`: Update all `version="unreleased"` tags in the default config
file XML sources to `version="X.Y.0"`.
- [ ] `master`: Update all [version directives][sphinx-ver-dir] with version
`unreleased` in the user docs to `X.Y.0`.
### 2 — On GitLab
- [ ] [Create branch][new branch] `X.Y-stable` from `master`
- [ ] [Create label][new label] ~"Pick into X.Y"
- [ ] [Create tag][new tag] `X.Y.0` from branch `X.Y-stable`
- Message:
```
Version X.Y.0 (YYYY-MM-DD)
```
- Release Notes:
```
# Version X.Y.0 (YYYY-MM-DD)
-> Insert version changelog here! <-
```
Shortcut to the most up-to-date [CHANGELOG.md][changelog]
- [ ] Update "Release" [project badge][badge] <!-- only if applicable -->
### 3 — In the Code
- [ ] `master`: Update version numbers in `VERSION`, `CHANGELOG.md`,
`dune.module` to `X.Y+1-pre`.
### 4 — On Docker Hub
- [ ] Update [description on DockerHub][DockerHub description]
- [ ] Push new `latest` tag to DockerHub <!-- only if applicable -->
### 5 — All done? :white_check_mark:
Close this issue!
/label ~Release
[new branch]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/branches/new
[new tag]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/tags/new
[changelog]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/blob/master/CHANGELOG.md
[new label]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/labels/new
[DockerHub description]: https://hub.docker.com/r/dorie/dorie
[badge]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/edit
[sphinx-ver-dir]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-versionadded
### What does this MR do?
_Fill this in_
### Is there something that needs to be double checked?
<!-- Is there something a reviewer should look out for _especially_? -->
_Fill this in_
### Can this MR be accepted?
- [ ] Implemented ...
- [ ] Added test to ...
- ...
- [ ] Pipeline passing
- [ ] ...
- [ ] Added/Updated tests:
- [ ] ...
- [ ] Added/Updated documentation
- [ ] Pipeline passing <!-- please check for new warnings -->
- [ ] Squash option set <!-- unless there's a good reason -->
- [ ] Delete branch option set <!-- unless there's a good reason -->
- [ ] Added entry to `CHANGELOG.md`
_**Assignee:** If the Squash option is set, check/update the commit message right before merging!_
### Related issues
Closes #, # and #
Closes #
<!-- For automatic closing, do not forget the commas between issue numbers-->
......
<!-- _Set the title to: "Resolve "Patch Release: X.Y.Z"" -->
<!-- Replace X.Y.Z with the actual version numbers everywhere -->
We're releasing patch version `X.Y.Z` for branch `X.Y-stable`! :tada:
### Release Issue
<!-- DO NOT use automatic Issue resolution here! -->
The MRs to be considered in this update are listed in #
### Tasks
- [ ] Cherry-pick the listed commits into `X.Y-patch`
- [ ] `CHANGELOG.md`: Move appropriate entries into new section
- [ ] Update version numbers in `VERSION`, `CHANGELOG.md`, `dune.module`
- [ ] Update `version="unreleased"` tags in the default config file XML
sources <!-- only if applicable -->
- [ ] Update Sphinx version directives with version `unreleased` in the user
docs. <!-- only if applicable -->
#### Help on Cherry-Picking
Cherry-picking merge commits requires specifying the "mainline" parent, which
should always be number 1. Append a line indicating a cherry-pick to the commit
message with the `-x` argument. The following should do the trick:
```bash
git cherry-pick -m 1 -x <commits>
```
Replace `<commits>` with the Commit SHAs listed above, separated by a single
whitespace each. Make sure they are in chronological order to reduce the
number of merge conflicts! Fix such conflicts as unintrusively as possible.
### Can this MR be merged?
- [ ] Pipeline passing <!-- please check for new warnings -->
- [ ] Delete branch option set <!-- unless there's a good reason -->
### Related Issues
......@@ -4,34 +4,14 @@
## Unreleased
### Added
* DORiE now depends on [`yaml-cpp`](https://github.com/jbeder/yaml-cpp/), a
library for reading YAML files. The version required is >=5.2.0.
* New classes representing parameterizations. Every parameterization must now
derive from `RichardsParameterization`, and return function objects
representing parameterization functions.
* Added a abstract base class [`SimulationBase`](dune/dorie/interface/base_simulation.hh)
that models the concept of simulation steps so that they
can be later coupled with other simulations.
* Added an abstract base class
[`SimulationBase`](dune/dorie/common/simulation_base.hh)
that models the concept of simulation steps so that they
can be later coupled with other simulations.
* New classes representing parameterizations. Every parameterization must now
derive from `RichardsParameterization`, and return function objects
representing parameterization functions.
* CMake module `DorieTesting.cmake`. The module contains multiple functions
which facilitate registering tests in the two new testing categories:
System tests and Unit tests. Unit tests are compiled with appropriate flags
for code coverage reports.
* Code coverage reports for unit tests. Detailed reports can be retrieved from
the artifacts of the `test:unit-tests` test in the folder
`build-cmake/test/coverage`. The total coverage is reported to GitLab.
* New class [`SimulationTransport`](dune/dorie/interface/transport_simulation.hh)
which solves the transport equation with a finite volume scheme for give
grid functions of water content and velocity.
* [`yaml-cpp`](https://github.com/jbeder/yaml-cpp/) v5.2.0 or greater as
dependency !81
* Abstract base class for Models !87
* Finite volume solver for passive transport model !93 !88
* Grid function container to store transient grid functions !115
* Infrastructure for the input of Miller scaling fields. !110
* Add logging framework 'spdlog' as submodule !106
* Logging framework [`spdlog`](https://github.com/gabime/spdlog) as
Git submodule for all terminal output !106
* Support input of boundary segmentations !119
* Reconstruction of continuous fluxes using RT finite elements !105
* Custom DG finite element map for simplices based on Pk polynomials !125
......@@ -39,113 +19,34 @@
[muparser](http://beltoforion.de/article.php?a=muparser) !131
* Coupling between transient models for water flow and solute transport !96
* Initial conditions generated from H5 input data !130
* Generic Python VTK file reader !143
* Linear interpolator for initial conditions and scaling fields !145, !156
* Parameterizations for hydrodynamic dispersion in solute transport !141
* Generic Python VTK file reader !143, !150
* Generic Python VTK file reader !143, !150, !178
* Define compile-time settings via CPP macros !144
* [Google Test](https://github.com/google/googletest) unit test framework
as Git Submodule !159
* Upwinding options for Richards finite volume local operator !161
* Cookbook tutorial on infiltration into homogeneous sand !157
* GitLab Description Templates for Releases !166
* ParaView tutorial for analyzing DORiE output files !173
* Parameter XML files support tags for version changes !171
* Unit test for Parameter XML file parser !171
* CMake option to enable code coverage flags on all targets !172
* Changes to config file parameters listed per version in user docs !175
### Changed
* `Simulation` is renamed `RichardsSimulation` and moved to
[richards.hh](dune/dorie/model/richards/richards.hh).
* `RichardsSimulation` now has its own `RichardsSimulationTraits` derived from
`BaseTraits`, which defines all its member types. `BaseTraits` now have
reduced content and are intended to be shared between models/simulations.
* Data structures for storing and accessing parameters. The new class
`FlowParameters` maps parameter sets and scaling factors to every grid cell
on the coarsest grid level, and only stores one set of parameters for
each soil layer. Before querying the parameterization functions, users need
to call `FlowParameters::bind` with a grid entity to cache the appropriate
data. All classes and functions querying parameter data have been updated.
The old parameterization classes located in
[`param_base.hh`](dune/dorie/solver/param_base.hh),
[`param_factory.hh`](dune/dorie/solver/param_factory.hh), and
[`param_van_genuchten.hh`](dune/dorie/solver/param_van_genuchten.hh)
are still used for reading in data for the new storage scheme.
The respective objects are freed once a simulation commences.
* Grid adaptation now is done in two steps: (1) mark entities of the grid to
refine/coarse and (2) adapt the grid and project the degrees of freedom on
the new grid.
The old parameterization classes have been removed.
* `RichardsSimulation` now uses one vector of coefficients instead of two, which
now is a `shared_ptr` instead a `unique_ptr`.
* Every `VTKAdapter` is now able to be used as `GridFunctionAdapter` of the
solution vector.
* `GradientFluxAdapter` was reimplemented and renamed `WaterFluxAdapter`.
* Every grid function adapter has its own file and are gathered in the
subdirectory
[dune/dorie/model/richards/adapters](dune/dorie/model/richards/adapters).
* `VTKAdapters` are now managed with `shared_ptr` instead of references.
* `OutputWriter` class is deprecated in favor of an minimal extension of the
usual `VTKSequenceWriter` for grid functions called
`GridFunctionVTKSequenceWriter`.
* `RichardsSimulation` now models the `SimulationBase` class (See details in
https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues/94). For this,
several methods were renamed with basically no change in behaviour.
* `RichardsSimulation` and `TimeController` are able to receive a suggestion for
the next timestep.
* Static const `bool`s for adaptivity and output writing in `BaseTraits` were
removed in favor of run-time policies (See details in
https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues/94).
* Swich to the stable release branch `releases/2.6` of `dune-testtools`.
* The `build` CI stage now explicitly builds system tests and unit tests. The
job `build:main` has been removed. The `build:debug` jobs now build the
unit test targets.
* Merge Python packages into single new package `dorie`.
* Executables and files of unit-tests and system-tests are now located in
[`dune/dorie/test/`](dune/dorie/test/) and [`test/`](test/) respectively.
* The `dorie` CLI has been moved into the DORiE Python package. It can now only
be invoked after activating the DUNE virtual environment. The usage
instructions in docs and `README.md` have been updated accordingly.
* Soil architecture and parameter input has been completely revised.
DORiE now expects a YAML file containing parameterization data and separate
domain mapping data which can be supplied through the input GMSH file, or as
H5 dataset. See the documentation for more information. Several keys in the
main routine config file have been changed.
See [#86](https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues/86).
* The Parameter Field Generator (PFG) module has been revised and does not
write parameterization data anymore.
It can be used to create mappings for heterogeneous media through the
binary converter, or continuous scaling fields (feature pending).
Several keys in the PFG config file have been changed.
See [#86](https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues/86).
* Improved and refurbished `Dorie::H5File`.
The source file was renamed to `dune/dorie/common/util_h5file.hh`. The
`read_dataset` function is now capable of directly opening dataset paths
that contain groups.
* The following changes were done in order to have a consistent API to support
different models:
* Folder structure has changed to a model based structure: in the main
[C++ source directory](dune/dorie/) there now is a `common` folder, and
a folder for `model` containing the source files for each model.
* The API has been updated to support several models: from now, categories
that target a specific model has to be preceded by a keyword
identifying the corresponding model (e.g. `richards.initial`,
`richards.output`, etc.), while common categories stay with no prefix
at all (e.g. `grid`, `adaptivity`, etc.).
* The parameter scraper now accepts the argument `--model <model>` which
adds the prefix `<model>.` to every category in the scraper. This helps
to be able to use the method `sub()` from the `ParameterTree` object.
It dumps its data into a YAML file which is then loaded for writing
the default configuration files and the cheat sheet.
* Use logging framework 'spdlog' for all terminal output !106
* DORiE now writes vertex data by default. #129
* Data structures for storing and accessing parameter information !55
* Split unit tests into separate CI job with coverage reports !98
* Split grid adaptivity process into marking and actual adaptation !91
* Rework VTK adapters and VTK output writer !64
* `RichardsSimulation` now implements the abstract simulation base class !89
* Switch to the stable release branch `releases/2.6` of `dune-testtools` !97
* Merge Python packages into single new package `dorie` !100
* Move `dorie` Command Line Interface script into Python package !102
* Parameterization data input via YAML and H5 files !82
* Simplify H5 reader to only read datasets !109
* Extend run config file to contain data on multiple models !103
* DORiE now writes vertex data by default. !128
* Switch license from MIT to GPLv3 !135
* Specifying scaling field `extensions` and `offset` is now optional !133
* Generalized initial condition specification in config file !129
......@@ -156,27 +57,25 @@
* Build independent library and executable for each compile-time setting !144
* `SimulationBase` unit test now uses Google Test !159
* Deploy online documentation for each branch to private server !163
* Use YAML (instead of muPhi `.bcdat`) files for specifying BCs !121
* Unit and system tests report code coverage separately !172
### Fixed
* Solver in `RichardsSimulation` was using the wrong time variable.