Trisurf Monte Carlo simulator
Samo Penic
2016-03-03 292ac4738a980823072387033af7a97027405e54
commit | author | age
292ac4 1 b0VIM 7.4ŽkØVDësamoaltea~samo/programiranje/trisurf-ng/python/trisurf/trisurf.py U3210#"! UtpÿYad.¦    YíìÛ¸ªž”“’ŽYXWJVUQPONBÿ þ Ü Õ ¬ ¢ p e c b F    ì Ò Ñ Ð Ï Á ¼ k f G 4    ä Ý ¼ ² Š  ~ f J $  ï
SP 2 æ
3 å
4 «
5 –
6 †
7 k
8 W
9 4
10 3
11 *
12 )
13 
14
bd6993 15
292ac4 16 ù    ò    ñ    à    Ù    Ø    Ä    §    ¦            return("Running inst        return("Running instance")    def _        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=''):        return        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):        return        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