From 1f47b6caeffbfd6dabc80adeb2bb69620cece708 Mon Sep 17 00:00:00 2001
From: David Seus <david.seus@ians.uni-stuttgart.de>
Date: Wed, 14 Oct 2020 12:27:46 +0200
Subject: [PATCH] correct howto, add testing instructions

---
 Setup/README.md | 71 ++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 58 insertions(+), 13 deletions(-)

diff --git a/Setup/README.md b/Setup/README.md
index 5168179..c0d750e 100644
--- a/Setup/README.md
+++ b/Setup/README.md
@@ -21,7 +21,7 @@ Adding yourself to the docker group can by done by running
 
     sudo gpasswd -a <username> docker
 
-where <username> is to be replaced by your user name. Don't forget to log out and back in again, to make 
+where <username> is to be replaced by your user name. Don't forget to log out and back in again, to make
 the change effective.
 
 On `systemd`-based systems the daemon is started by running
@@ -123,7 +123,7 @@ This should be achieved by running
 
     cd shared/Setup
 
-within the container. Upgrade pip by running 
+within the container. Upgrade pip by running
 
     sudo pip3 install --upgrade pip
 
@@ -132,7 +132,7 @@ within the container. Upgrade pip by running
     sudo pip3 install -r python_requirements.txt
 
 to install missing python requirements needed to run `LDDsimulation` based
-code.  In case you get an error 
+code.  In case you get an error
 
 ~~~
 ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
@@ -141,31 +141,76 @@ We recommend you use --use-feature=2020-resolver to test your packages with the
 
 pandas 1.1.3 requires numpy>=1.15.4, but you'll have numpy 1.13.3 which is incompatible.
 ~~~
-you might have to run 
+you might have to run
 
     sudo pip3 --use-feature=2020-resolver install pandas
 
-on offending packages. 
-In case you get a warning like this 
+on offending packages.
+In case you get a warning like this
 ~~~
   WARNING: The scripts f2py, f2py3 and f2py3.6 are installed in '/home/fenics/.local/bin' which is not on PATH.
   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
 ~~~
-you need to add 
+you need to add
 ~~~bash
 export PATH=/home/fenics/.local/bin:$PATH
-~~~ 
-to your `~/.bashrc` or `.profile` script within the `LDD-TPR` container. 
+~~~
+to your `~/.bashrc` or `.profile` script within the `LDD-TPR` container.
 
-Finally, add the `LDDsimulation` folder to your python path by adding 
-~~~bash 
+Finally, add the `LDDsimulation` folder to your python path by adding
+~~~bash
 export PYTHONPATH=${PYTHONPATH}:${HOME}/shared/LDDsimulation/:
 ~~~
-to ~/fenics.env.conf. 
+to ~/fenics.env.conf.
+After steeing this you need to exit the container (by typing `exit`) and
+step in again, to make changes effective.
+
+### Testing your installation
+Concrats, now you can test the installation by running the example
+`./InstallationTest/installTest.py` from within your docker container.
+Assuming you have stepped into your docker container (see above) do
+~~~bash
+cd ~/shared/Setup/InstallationTest
+./run_simulation installTest.py
+~~~
+This should run the simulation and finish by an output similar to
+~~~
+[...]
+Errornorms on subdomain1
+phase: wetting
+Linf: 0.0042076773235871145
+
+L1: 0.00017973029458472718
+
+L2: 0.0008131932461893378
+
+Errornorms on subdomain2
+phase: wetting
+Linf: 0.002710740880961932
+
+L1: 9.73312482410056e-05
 
-Concrats, now you can test the installation by running an example in the
+L2: 0.00044527206568625654
+
+phase: nonwetting
+Linf: 0.0045331147006416215
+
+L1: 0.00021445882146514718
+
+L2: 0.0009595771245508499
+
+fenics@bdac3735c78b:~/shared/Setup/InstallationTest$ exit
+~~~
+
+Alternatively you can run an example in the
 [Usecases](../Usecases) folder of the `LDDsimulation` repo.
 
+>>>**Note**
+It might happen, that not all usecases are running, due to forgetting to update
+the script. If that happens and you wanted to run that particular usecase,
+find a usecase that works and diff the two files, to see what's missing.
+>>>
+
 ## Usefull docker commands
 
 List all docker container
-- 
GitLab