Trisurf Monte Carlo simulator
Samo Penic
2016-03-03 bd69936da8e1f59147b7e2dde0f53067ee1ff94a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
b0VIM 7.4ŽkØVDësamoaltea~samo/programiranje/trisurf-ng/python/trisurf/trisurf.py U3210#"! UtpÿWadH¸    WíìÛ¸ªž”“’ŽYXWJVUQPONBÿ þ Ü Õ ¬ ¢ p e c b F    ì Ò Ñ Ð Ï Á ¼ k f G 4   í æ Å » “ ˆ ‡ o S -  ø
÷
½
¨
˜
}
i
F
E
<
;
%
 
 
 
 
 
ò    ë    ê    Ö    ¹    ¸    ‚    k            return("Running inst        return("Running instance")    def __str__(self):        p        return("Running instance")    def __str__(self):        pass    def stop(self):        pass    def start(self):        pass    def getStatus(self):        return            self.initFromSnapshot(snapshot)        if(snapshot!=''):            self.initFromTape(tape)        if(tape!=''):        self.subdir=subdir    def __init__(self, subdir='run0', tape='', snapshot=''):        self.tape.setTape(tapetxt.text)        self.tape=Tape()        version=root.find('trisurfversion')        tapetxt=root.find('tape')        root = tree.getroot()            exit(1)            print("Error reading snapshot file")        except:            tree = ET.parse(snapshotfile)        try:    def initFromSnapshot(self, snapshotfile):        self.tape.readTape(tape)        self.tape=Tape()    def initFromTape(self, tape):    '''    Class Runner consists of a single running or terminated instance of the trisurf    '''class Runner:        return self.config[key]    def getValue(self,key):        return        self.config=configobj.ConfigObj(io.StringIO(string))    def setTape(self, string):                exit(1)            print("Error reading or parsing tape file!\n")        except:            self.config=configobj.ConfigObj(tape)        try:    def readTape(self, tape='tape'):        return    def __init__(self):    '''Has all the info on the tape'''class Tape:'''If tape is specified, the trisurf wilt start from tape with initial distribution, if snapshot is specified the trisurf will be restored from given snapshot file and simulation will continue.tsmgr [-t tape | -r snapshot.vtu] [-s subdirectory]Invoke with:This is a trisurf instance manager written in python'''import ioimport zlibimport base64import xml.etree.ElementTree as ETimport configobj#!/usr/bin/python3