Exemple #1
0
 def __init__(self,analyzer,
              argv=None,
              silent=False,
              logname="PyFoamSolve",
              server=False,
              lam=None,
              compressLog=False,
              restart=False,
              noLog=False,
              logTail=None,
              remark=None,
              jobId=None,
              smallestFreq=60.):
     """ @param analyzer: the analyzer for the output
     argv, silent, logname, server, lam, noLog - see BasicRunner"""
     BasicRunner.__init__(self,argv,silent,logname,
                          server=server,
                          lam=lam,
                          restart=restart,
                          compressLog=compressLog,
                          noLog=noLog,
                          logTail=logTail,
                          remark=remark,
                          jobId=jobId)
     StepAnalyzedCommon.__init__(self,
                                 logname,
                                 analyzer,
                                 smallestFreq=smallestFreq)
Exemple #2
0
 def __init__(self,
              fname,
              smallestFreq=0.,
              persist=None,
              splitThres=2048,
              plotLinear=True,
              plotCont=True,
              plotBound=True,
              plotIterations=False,
              plotCourant=False,
              plotExecution=False,
              plotDeltaT=False,
              hardcopy=False,
              hardcopyFormat="png",
              hardcopyPrefix=None,         
              customRegexp=None,
              writeFiles=False,
              raiseit=False,
              progress=False,
              start=None,
              end=None,
              singleFile=False,
              writePickled=True,
              plottingImplementation=None):
     """
     TODO: Docu
     """
     StepAnalyzedCommon.__init__(self,
                                 fname,
                                 BoundingLogAnalyzer(doTimelines=True,
                                                     doFiles=writeFiles,
                                                     progress=progress,
                                                     singleFile=singleFile,
                                                     startTime=start,
                                                     endTime=end),
                                 writePickled=writePickled,
                                 smallestFreq=smallestFreq)
     
     self.startTime=start
     self.endTime=end
     
     self.plots=self.createPlots(persist=persist,
                                 raiseit=raiseit,
                                 start=start,
                                 end=end,
                                 writeFiles=writeFiles,
                                 splitThres=splitThres,
                                 plotLinear=plotLinear,
                                 plotCont=plotCont,
                                 plotBound=plotBound,
                                 plotIterations=plotIterations,
                                 plotCourant=plotCourant,
                                 plotExecution=plotExecution,
                                 plotDeltaT=plotDeltaT,
                                 customRegexp=customRegexp,
                                 plottingImplementation=plottingImplementation)
 
     self.hardcopy=hardcopy
     self.hardcopyFormat=hardcopyFormat
     self.hardcopyPrefix=hardcopyPrefix
Exemple #3
0
 def stopHandle(self):
     StepAnalyzedCommon.stopHandle(self)
     self.timeHandle()
     if self.hardcopy:
         if self.hardcopyPrefix:
             prefix=self.hardcopyPrefix+"."
         else:
             prefix=""
             
         for p in self.plots:
             if not self.plots[p].hasData():
                 continue
             self.plots[p].doHardcopy(prefix+p,self.hardcopyFormat)
Exemple #4
0
 def __init__(self,
              analyzer,
              argv=None,
              silent=False,
              logname="PyFoamSolve",
              smallestFreq=0.,
              server=False,
              remark=None,
              jobId=None):
     """@param smallestFreq: the smallest intervall of real time (in seconds) that the time change is honored"""
     BasicRunner.__init__(self,
                          argv,
                          silent,
                          logname,
                          server=server,
                          remark=remark,
                          jobId=jobId)
     StepAnalyzedCommon.__init__(self,
                                 logname,
                                 analyzer,
                                 smallestFreq=smallestFreq)
Exemple #5
0
 def __init__(self,filename,analyzer,silent=False,smallestFreq=0.,tailLength=1000,sleep=0.1):
     """@param smallestFreq: the smallest intervall of real time (in seconds) that the time change is honored"""
     BasicWatcher.__init__(self,filename,silent=silent,tailLength=tailLength,sleep=sleep)
     StepAnalyzedCommon.__init__(self,filename,analyzer,smallestFreq=smallestFreq)
Exemple #6
0
    def stopHandle(self):
        BasicRunner.stopHandle(self)
        StepAnalyzedCommon.stopHandle(self)

        self.tearDown()
Exemple #7
0
 def lineHandle(self,line):
     """Not to be called: calls the analyzer for the current line"""
     StepAnalyzedCommon.lineHandle(self,line)
     BasicRunner.lineHandle(self,line)
Exemple #8
0
 def timeHandle(self):
     StepAnalyzedCommon.timeHandle(self)
     
     for p in self.plots:
         self.plots[p].redo()