From b5a205ffa644a67d7aa1d8fac9d37cd4159213e7 Mon Sep 17 00:00:00 2001 From: David Seus <david.seus@ians.uni-stuttgart.de> Date: Wed, 14 Oct 2020 15:49:09 +0200 Subject: [PATCH] explain helper functions --- LDDsimulation/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/LDDsimulation/README.md b/LDDsimulation/README.md index e1f87cf..9c165d3 100644 --- a/LDDsimulation/README.md +++ b/LDDsimulation/README.md @@ -11,7 +11,8 @@ It defines the class `LDDsimulation` that contains methods to setup the simulation and run it. Each usecase file in `../Usecases` essentially sets up an instance of this class and defines all parameters needed by the `LDDsimulation.set_parameters(kwrgs**)` function -which gets called +which gets called by the `main()` of each usecase (more precisely by + `helpers.run_simulation()`). ## `domainPatch.py` @@ -24,3 +25,16 @@ which gets called ## `functions.py` ## `helpers.py` + +This file contains some helper functions which are mostly used to keep the usecase files tidier. +It should be clear from the function names what each function is used for. +The following is noteworthy if you start developing: + +- `run_simulation(**kwrgs)`: This function gets called by the main of each usecase and sets up and runs an instance of `class LDDsimulation`. +_Note that if you add features to the latter, say you add parameters or generally change the parameter structure, this function will most likely have +to be changed accordingly._ + +- `generate_exact_solution_expressions(**kwrgs)`: This function generates the +initial condition, exact solution as well as corresponding source term dictionaries given a symbolic exact solution expression as input. This means that _the models of the code are hardcoded_ in this function. +_If you want to add other models of the code and test with exact solutions, +this function will have to be adjusted!_ -- GitLab