Package PyFoam :: Package LogAnalysis :: Module UtilityAnalyzer :: Class UtilityAnalyzer
[hide private]
[frames] | no frames]

Class UtilityAnalyzer

source code


Analyzer for non-solver Utilities

Regular expressions can be added and the data generated by them can be accessed

Instance Methods [hide private]
 
__init__(self, progress=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
addExpression(self, name, expr, idNr=None)
Add a RegExp
source code
 
getData(self, name, time=None, ID=None)
Get data
source code
 
getIDs(self, name)
Get a list with the available IDs
source code
 
getTimes(self, name, ID=None)
Get a list with the available times for a specific ID
source code

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

    Inherited from FoamLogAnalyzer.FoamLogAnalyzer
 
addAnalyzer(self, name, obj)
Adds an analyzer
source code
 
addTimeListener(self, listener) source code
 
addTrigger(self, time, func, once=True, until=None)
Adds a trigger function that is to be called as soon as the simulation time exceeds a certain value
source code
 
analyze(self, fh)
Analyzes a file (one line at a time)
source code
 
analyzeLine(self, line)
Calls all the anlyzers for a line
source code
 
checkTriggers(self)
Check for and execute the triggered functions
source code
 
collectData(self)
Collect dictionaries of collected data (current state) from the analyzers
source code
 
getAnalyzer(self, name)
Get the LogLineAnalyzer name
source code
 
getDirectory(self)
Gets the output directory
source code
 
getTime(self)
Gets the current time
source code
 
goOn(self)
Checks with all the analyzers
source code
 
hasAnalyzer(self, name)
Is this LogLineAnalyzer name there
source code
 
listAnalyzers(self)
Returns: A list with the names of the Analyzers
source code
 
setDirectory(self, d)
Sets the output directory for all the analyzers
source code
 
setTime(self, time)
Sets the time and alert all the LineAnalyzers that the time has changed
source code
 
tearDown(self)
Remove reference to self in children (hoping to remove circular dependencies)
source code
 
writeProgress(self, msg)
Write a message to the progress output
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, progress=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • progress - Print time progress on console?
Overrides: object.__init__

addExpression(self, name, expr, idNr=None)

source code 

Add a RegExp

Parameters:
  • name - name of the RegExp
  • expr - the RegExp
  • idNr - number of the pattern group that identifies data-sets

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

source code 

Get data

Parameters:
  • name - name of the RegExp
  • time - time from which the data set it to be read
  • ID - identification of the data set
Returns:
tuple with the data