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

Class RegExpLineAnalyzer

LogLineAnalyzer --+    
                  |    
GeneralLineAnalyzer --+
                      |
                     RegExpLineAnalyzer

Known Subclasses:
RegExpTimeLineLineAnalyzer

Parses lines for an arbitrary regular expression

Only one data-set is stored per time-step

One pattern group of the RegExp can be used as a unique identifier, so that more than one data-sets can be stored per time-step

The string %f% in the regular expression is replaced with the regular expression for a floating point number
Method Summary
  __init__(self, name, exp, idNr, titles, doTimelines, doFiles)
  addToFiles(self, match)
Method that adds matched data to files
  addToTimelines(self, match)
Method that adds matched data to timelines
  getData(self, time, ID)
get a data value at a specific time for a specific ID
  getIDs(self)
get a list of the available IDs
  getLast(self, ID)
get the last time for the identifier ID
  getTimes(self, ID)
get the available time for the identifier ID
  startAnalysis(self, match)
Method at the start of a successfull match
  sub(self, ID)
get the data set for the identifier ID
    Inherited from GeneralLineAnalyzer
  doAnalysis(self, line)
General analysis method.
  endAnalysis(self, match)
Method at the end of a successfull match
  getTimeline(self, name)
Return the timeline as two list: the times and the values
  setDirectory(self, oDir)
Creates the OutFileCollection-object
  setTitles(self, titles)
Sets the titles anew
  timeChanged(self)
Sets the current time in the timelines
    Inherited from LogLineAnalyzer
  getTime(self)
Return current time
  goOn(self)
If the analyzer thinks the simulation should be stopped (for instance because of convergence) it returns false
  setParent(self, parent)
Introduces the LineAnalyzer to its supervisor

Class Variable Summary
str floatRegExp = '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?...

Method Details

__init__(self, name, exp, idNr=None, titles=[], doTimelines=False, doFiles=True)
(Constructor)

Parameters:
name - name of the expression (needed for output
exp - the regular expression, %f% will be replaced with the regular expression for a float
idNr - number of the pattern group that is used as an identifier
titles - titles of the columns
Overrides:
PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer.__init__

addToFiles(self, match)

Method that adds matched data to files
Parameters:
match - data matched by a regular expression
Overrides:
PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer.addToFiles (inherited documentation)

addToTimelines(self, match)

Method that adds matched data to timelines
Parameters:
match - data matched by a regular expression
Overrides:
PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer.addToTimelines (inherited documentation)

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

get a data value at a specific time for a specific ID

getIDs(self)

get a list of the available IDs

getLast(self, ID=None)

get the last time for the identifier ID

getTimes(self, ID=None)

get the available time for the identifier ID

startAnalysis(self, match)

Method at the start of a successfull match
Overrides:
PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer.startAnalysis (inherited documentation)

sub(self, ID)

get the data set for the identifier ID

Class Variable Details

floatRegExp

Type:
str
Value:
'[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'                            

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net