From b122c46c95b96febda4ebf3c8ddfa79998d599f9 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Thu, 07 Apr 2016 08:18:06 +0000
Subject: [PATCH] Added option to include trisurf runtime arguments in the main configuration file.

---
 python/trisurf/trisurf.py |    7 ++++---
 python/tsmgr              |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/python/trisurf/trisurf.py b/python/trisurf/trisurf.py
index dc1cb78..b055f19 100644
--- a/python/trisurf/trisurf.py
+++ b/python/trisurf/trisurf.py
@@ -246,8 +246,9 @@
 	'''
 	Class Runner consists of a single running or terminated instance of the trisurf. It manages starting, stopping, verifying the running process and printing the reports of the configured instances.
 	'''
-	def __init__(self, subdir='run0', tape='', snapshot=''):
+	def __init__(self, subdir='run0', tape='', snapshot='', runArgs=[]):
 		self.subdir=subdir
+		self.runArgs=runArgs
 		self.fromSnapshot=False
 		if(tape!=''):
 			self.initFromTape(tape)
@@ -309,9 +310,9 @@
 			self.Dir.goto()
 			print("Starting trisurf-ng executable at "+self.Dir.fullpath()+"\n")
 			if(self.fromSnapshot==True):
-				params=["trisurf", "--restore-from-vtk",self.snapshotFile]
+				params=["trisurf", "--restore-from-vtk",self.snapshotFile]+self.runArgs
 			else:
-				params="trisurf"
+				params=["trisurf"]+self.runArgs
 			Popen (params, stdout=False)
 			cwd.goto()
 		else:
diff --git a/python/tsmgr b/python/tsmgr
index 1f5b8eb..775d667 100755
--- a/python/tsmgr
+++ b/python/tsmgr
@@ -9,7 +9,7 @@
 run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
 run1.setSubdir("run0")
 
-run2=trisurf.Runner(tape='tape')
+run2=trisurf.Runner(tape='tape', runArgs=['--force-from-tape'])
 run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
 run2.setSubdir("run1")
 

--
Gitblit v1.9.3