Trisurf Monte Carlo simulator
Samo Penic
2016-04-07 b122c46c95b96febda4ebf3c8ddfa79998d599f9
Added option to include trisurf runtime arguments in the main configuration file.
2 files modified
9 ■■■■■ changed files
python/trisurf/trisurf.py 7 ●●●●● patch | view | raw | blame | history
python/tsmgr 2 ●●● patch | view | raw | blame | history
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:
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")