Package PyFoam :: Package Execution :: Module UtilityRunner :: Class UtilityRunner
[hide private]
[frames] | no frames]

Class UtilityRunner

source code


To this runner regular expressions can be added. Each line is checked against each regular expression and saved with the corresponding time.

Each RegEx has a name

For each pattern group in the RegEx one data value is stored

Instance Methods [hide private]
 
__init__(self, argv=None, silent=False, logname='PyFoamUtility', server=False, restart=False, compressLog=False, noLog=False, logTail=None, remark=None, parameters=None, lam=None, jobId=None)
see BasicRunner
source code
 
add(self, name, exp, idNr=None)
adds a regular expression
source code
 
get(self, name, time=None, ID=None)
get a data set
source code
 
getIDs(self, name)
get a list of all the IDs
source code
 
getTimes(self, name, ID=None)
get a list of all the times that are available for ID
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from AnalyzedRunner.AnalyzedRunner
 
firstClockTime(self) source code
 
firstCpuTime(self) source code
 
lastTime(self) source code
 
lineHandle(self, line)
Not to be called: calls the analyzer for the current line
source code
 
stopHandle(self)
called after the program has stopped
source code
 
totalClockTime(self) source code
 
totalCpuTime(self) source code
    Inherited from StepAnalyzedCommon.StepAnalyzedCommon
 
timeChanged(self)
React to a change of the simulation time in the log
source code
 
timeHandle(self)
Handler that reacts to the change of time.
source code
    Inherited from AnalyzedCommon.AnalyzedCommon
 
addAnalyzer(self, name, analyzer) source code
 
addTrigger(self, time, func, once=True, until=None)
Adds a timed trigger to the Analyzer
source code
 
createPlots(self, persist=None, raiseit=False, splitThres=2048, plotLinear=True, plotCont=True, plotBound=True, plotIterations=True, plotCourant=True, plotExecution=True, plotDeltaT=True, start=None, end=None, writeFiles=False, customRegexp=None, plottingImplementation='dummy') source code
 
getAnalyzer(self, name) source code
 
getDirname(self)
Get the name of the directory where the data is written to
source code
 
getTime(self)
Get the execution time
source code
 
hasAnalyzer(self, name) source code
 
listAnalyzers(self)
Returns: A list with the names of the analyzers
source code
 
picklePlots(self, wait=False)
Writes the necessary information for the plots permanently to disc, so that it doesn't have to be generated again
source code
 
reset(self)
reset the analyzer
source code
 
setDataSet(self, data) source code
 
tearDown(self) source code
    Inherited from BasicRunner.BasicRunner
 
addEndTrigger(self, f) source code
 
appendTailLine(self, line)
Append lines to the tail of the log
source code
PyFoam.RunDictionary.SolutionDirectory
getSolutionDirectory(self, archive=None)
Returns: The directory of the case
source code
 
logName(self)
Get the name of the logfiles
source code
 
runOK(self)
checks whether the run was successful
source code
 
start(self)
starts the command and stays with it till the end
source code
 
startHandle(self)
to be called before the program is started
source code
 
stopGracefully(self)
Tells the runner to stop at the next convenient time
source code
 
writeLastSeen(self) source code
 
writeNowTime(self, force=False) source code
 
writeResults(self)
Writes the next possible time-step
source code
 
writeStartTime(self)
Write the real time the run was started at
source code
 
writeTailLog(self)
Write the last lines to the log
source code
 
writeTheState(self, state, always=True)
Write the current state the run is in
source code
 
writeToStateFile(self, fName, message)
Write a message to a state file
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, argv=None, silent=False, logname='PyFoamUtility', server=False, restart=False, compressLog=False, noLog=False, logTail=None, remark=None, parameters=None, lam=None, jobId=None)
(Constructor)

source code 

see BasicRunner

Parameters:
  • analyzer - the analyzer for the output argv, silent, logname, server, lam, noLog - see BasicRunner
Overrides: object.__init__

add(self, name, exp, idNr=None)

source code 

adds a regular expression

name - name under whcih the RegExp is known exp - the regular expression idNr - number of the pattern group that is used to make a data set unique

get(self, name, time=None, ID=None)

source code 

get a data set

name - name of the RegExp time - at which time (if unset the last time is used) ID - the unique ID determined by idNr