PyFoam.LogAnalysis.RegExpLineAnalyzer module

Analyzes lines with regular expressions

class PyFoam.LogAnalysis.RegExpLineAnalyzer.RegExpLineAnalyzer(name, exp, idNr=None, dataTransformations=None, stringValues=None, titles=[], doTimelines=False, doFiles=True, accumulation=None, progressTemplate=None, singleFile=False, startTime=None, endTime=None)[source]

Bases: PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer

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

addToFiles(match)[source]
addToTimelines(match)[source]
filterIdFromData(fdata)[source]
getCurrentData(structured=False)[source]
getData(time=None, ID=None)[source]

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

getIDs()[source]

get a list of the available IDs

getLast(ID=None)[source]

get the last time for the identifier ID

getTimes(ID=None)[source]

get the available time for the identifier ID

makeID(match)[source]
processProgressTemplate(data)[source]
startAnalysis(match)[source]
stringToMatch(line)[source]

Returns string to match. To be overriden for multi-line expressions

sub(ID)[source]

get the data set for the identifier ID

transformData(d)[source]
class PyFoam.LogAnalysis.RegExpLineAnalyzer.RegExpTimeLineLineAnalyzer(name, exp, titles=[], startTime=None, endTime=None)[source]

Bases: PyFoam.LogAnalysis.RegExpLineAnalyzer.RegExpLineAnalyzer

Class that stores results as timelines, too