Resolve "Base class for simulations"
What does this MR do?
Implements what is proposed in #94 (closed).
- Add abstract class
SimulationBase
. - Add test
test-simulation-base.cc
.
Is there something that needs to be double checked?
Can this MR be accepted?
-
Implemented proposal -
Added unit test -
Added unit test to the pipeline -
Pipeline passing -
Added entry to CHANGELOG.md
Related issues
Closes #94 (closed)
Merge request reports
Activity
added 1 commit
- 2e17b93c - Adds a simulation base class and a unit test for it
added 1 commit
- 30a82ba0 - First support for RichardsSimulation with the new base class
added 1 commit
- c2c49692 - Now Richards simulation fullfils requirements of output and adaptivity. (still…
added 1 commit
- 4e808c02 - Enforce simulations to implement suggestTimestep()
added 7 commits
-
4e808c02...b43c4be9 - 6 commits from branch
master
- b9997219 - Merge branch 'master' into 94-base-class-for-simulations
-
4e808c02...b43c4be9 - 6 commits from branch
- Resolved by Lukas Riedel
Hopefully, this already solves #94 (closed). The real work comes in #95 (closed).
- Resolved by Lukas Riedel
That might be a bit unpleasant: Can we quickly talk about coding style? Although it is for Python, I like to roughly follow PEP 8. I'll just list some things only referring to the looks of the code and order them by importance. You can adapt, or keep your current style (also for single items).
-
Use
CamelCase
only for class-like structures. Functions and variables should uselowercase_underscore
.It simply looks better, I think.
-
Use a single whitespace after commata.
Improves readability, following PEP 8.
-
Indent with spaces.
Such that
git diff
looks good and Git itself won't get confused. -
Never exceed 80 symbols per line.
Because of git diffs getting unreadable. You can use 'Rulers' in your editor to visualize the limit.
-
Use 4 spaces per indentation level.
This is better readable and also makes you think about if a new indented code layer is necessary/applicable.
I know that much of DORiE's code does not conform to that, but the code base is already quite old. I adhere to this style when writing new code. We have a more thorough Coding Style Guide in the Utopia wiki. What do you think?
-
- Resolved by Lukas Riedel
- Resolved by Lukas Riedel
- Resolved by Lukas Riedel
- Resolved by Lukas Riedel
- Resolved by Lukas Riedel
added 1 commit
- 47e5d483 - renamed functions and added const keywords where needed
- Resolved by Santiago Ospina De Los Ríos
added 1 commit
- a79c1d84 - set output policy rule at the end of the step by default
mentioned in merge request !89 (merged)
mentioned in merge request !93 (merged)
- Resolved by Santiago Ospina De Los Ríos
- Resolved by Santiago Ospina De Los Ríos
What remains to be done is including the test in the actual CI pipeline. It has to be both built and executed. I think we need to split the build process into the actual executable and the unit tests.
Edited by Lukas Riedel
mentioned in issue #99 (closed)
added 127 commits
-
a79c1d84...e05eb529 - 121 commits from branch
master
- f96c5ab1 - Merge branch 'master' into 94-base-class-for-simulations
- 8634c970 - Merge branch 'fix-errors-from-mr-98' into 94-base-class-for-simulations
- 3895ff70 - Merge SimulationBase constructors by using default parameters
- c482c97d - Verify SimulationBase::step routine by adding adaptivity policy to test
- fff5b51a - Improve unit test of SimulationBase to check for calls to write_data
- ea28f4b5 - Use new unit test command for SimulationBase test
Toggle commit list-
a79c1d84...e05eb529 - 121 commits from branch
added 1 commit
- b6a50ea1 - Rename test of SimulationBase to test-simulation-base.cc
mentioned in commit fedee2f2
mentioned in merge request !144 (merged)