From 2f74e41cf5706334fcde64ae0e86a33c4fef884f Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Sat, 28 May 2016 21:13:20 +0000
Subject: [PATCH] A small fix. If a continuation of simulation with a starting snapshot is requested, the last known vtk from the directory is used as a snapshot.

---
 python/myTestConfig.py |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/python/myTestConfig.py b/python/myTestConfig.py
old mode 100644
new mode 100755
index 23f9342..b8e5c08
--- a/python/myTestConfig.py
+++ b/python/myTestConfig.py
@@ -1,17 +1,34 @@
+#!/usr/bin/python3
 from trisurf import tsmgr
 from trisurf import trisurf
 
+
+
+print("Running trisurf version "+ tsmgr.getTrisurfVersion())
+
+#Simple example how to start simulation from a previos snapshot
 run1=trisurf.Runner(snapshot='snapshot.vtu')
 run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
 run1.setSubdir("run0")
 
+print(run1.getLastVTU())
+
+#Example how to start simulation from tape. Extra argument in runArgs will be passed to trisurf executable (meaning that simulation will always start from the beginning (bipyramid) ignoring the fact that some states may have been calculated already)
 run2=trisurf.Runner(tape='tape', runArgs=['--force-from-tape'])
 run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
 run2.setSubdir("run1")
 
+#Example of programatical setup of 4 runs
+pRun=[]
+for i in range(0,4): #0,1,2,3
+	tpRun=trisurf.Runner(tape='tape')
+	tpRun.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
+	tpRun.setSubdir("programatical_"+str(i))
+	pRun.append(tpRun)
 
-#obligatory: combine all runs
-Runs=[run1,run2]
 
+#obligatory final configuration step: combine all runs
+Runs=[run1,run2]+pRun
+#start manager with configured runs
 tsmgr.start(Runs)
 

--
Gitblit v1.9.3