Trisurf Monte Carlo simulator
Samo Penic
2016-03-10 7c45b15da28ef8a95a3a886594b3c74abd15faa1
Some local changes
2 files modified
19 ■■■■ changed files
python/trisurf/trisurf.py 18 ●●●● patch | view | raw | blame | history
python/tsmgr 1 ●●●● patch | view | raw | blame | history
python/trisurf/trisurf.py
@@ -8,6 +8,7 @@
import os
from itertools import islice
import mmap
import shlex
'''
This is a trisurf instance manager written in python
@@ -129,16 +130,25 @@
                    i=0;
                    for line in fin:
                        if(i==1):
                            print (line)
                            #print (line)
                            fields=shlex.split(line)
                            epoch1=fields[0]
                            n1=fields[1]
                        if(i==nlines-1):
                            print (line)
                            fields=shlex.split(line)
                            epoch2=fields[0]
                            n2=fields[1]
                        i=i+1
            except:
                print("Cannot read statistics file in "+self.fullname+"\n")
                exit(1)
                return(False)
        else:
            print("File "+self.fullname+" does not exists.\n")
            exit(1)
            return(False)
        self.dT=(int(epoch2)-int(epoch1))/(int(n2)-int(n1))
        return(True)
class Runner:
    '''
python/tsmgr
@@ -6,6 +6,7 @@
run1=trisurf.Runner(snapshot='snapshot.vtu')
run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
run1.setSubdir("run0")
run1.start()
#run
print(run1)