From 49d9387de22d44ff5210f76c637c443bc143dad8 Mon Sep 17 00:00:00 2001 From: David Seus <david.seus@ians.uni-stuttgart.de> Date: Tue, 13 Oct 2020 09:29:39 +0200 Subject: [PATCH] explain requisits --- Usecases/README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Usecases/README.md b/Usecases/README.md index 284ebbb..41eabba 100644 --- a/Usecases/README.md +++ b/Usecases/README.md @@ -31,4 +31,27 @@ and update that copy with information in the obsolete scripts. In order to create a new usecase, either modify one of the existing ones, or copy one of the existing cases into a new file and start working on your own. To understand how usecases are set up, let's have a look at the file -[TP-R-2-patch-test.py](./Two-Phase-Richards/two-patch/TP-R-two-patch-test-case). +`TP-R-2-patch-test.py` in +[Two-Phase-Richards/two-patch/TP-R-two-patch-test-case/](./Two-Phase-Richards/two-patch/TP-R-two-patch-test-case/). +Each script is broken into certain parts, which we explain in what follows. + +### PREREQUISITS +~~~python3 +# PREREQUISITS ############################################################### +# check if output directory "./output" exists. This will be used in +# the generation of the output string. +if not os.path.exists('./output'): + os.mkdir('./output') + print("Directory ", './output', " created ") +else: + print("Directory ", './output', " already exists. Will use as output \ + directory") + +date = datetime.datetime.now() +datestr = date.strftime("%Y-%m-%d") + +# Name of the usecase that will be printed during simulation. +use_case = "TPR-2-patch-realistic-testrun" +# The name of this very file. Needed for creating log output. +thisfile = "TP-R-2-patch-test.py" +~~~ -- GitLab