PyFoam.Execution.AnalyzedCommon module

Common stuff for classes that use analyzers

class PyFoam.Execution.AnalyzedCommon.AnalyzedCommon(filename, analyzer, doPickling=True)[source]

Bases: object

This class collects information and methods that are needed for handling analyzers

__dict__ = mappingproxy({'__init__': <function AnalyzedCommon.__init__>, 'getAnalyzer': <function AnalyzedCommon.getAnalyzer>, '__module__': 'PyFoam.Execution.AnalyzedCommon', 'addCustomExpressions': <function AnalyzedCommon.addCustomExpressions>, 'hasAnalyzer': <function AnalyzedCommon.hasAnalyzer>, 'listAnalyzers': <function AnalyzedCommon.listAnalyzers>, 'setDataSet': <function AnalyzedCommon.setDataSet>, 'addAnalyzer': <function AnalyzedCommon.addAnalyzer>, 'picklePlots': <function AnalyzedCommon.picklePlots>, '__weakref__': <attribute '__weakref__' of 'AnalyzedCommon' objects>, '__doc__': 'This class collects information and methods that are needed for\n handling analyzers', 'reset': <function AnalyzedCommon.reset>, 'getDirname': <function AnalyzedCommon.getDirname>, 'createPlots': <function AnalyzedCommon.createPlots>, 'addPlots': <function AnalyzedCommon.addPlots>, 'tearDown': <function AnalyzedCommon.tearDown>, 'execNameFound': <function AnalyzedCommon.execNameFound>, 'addTrigger': <function AnalyzedCommon.addTrigger>, 'lineHandle': <function AnalyzedCommon.lineHandle>, '__dict__': <attribute '__dict__' of 'AnalyzedCommon' objects>, 'getTime': <function AnalyzedCommon.getTime>})
__init__(filename, analyzer, doPickling=True)[source]
Parameters:
  • filename – name of the file that is being analyzed
  • analyzer – the analyzer itself
  • doPickling – write the pickled plot data
__module__ = 'PyFoam.Execution.AnalyzedCommon'
__weakref__

list of weak references to the object (if defined)

addAnalyzer(name, analyzer)[source]
Parameters:
  • name – name of the LineAnalyzer to add
  • analyzer – the analyzer to add
addCustomExpressions(customRegexp, persist=None, start=None, end=None, raiseit=False, writeFiles=False, splitThres=2048, gnuplotTerminal=None, plottingImplementation='dummy')[source]
addPlots(plots)[source]

Add plots. To be overriden

addTrigger(time, func, once=True, until=None)[source]

Adds a timed trigger to the Analyzer :param time: the time at which the function should be triggered :param func: the trigger function :param once: Should this function be called once or at every time-step :param until: The time until which the trigger should be called

createPlots(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, gnuplotTerminal=None, plottingImplementation='dummy')[source]
execNameFound(execName)[source]
getAnalyzer(name)[source]
Parameters:name – name of the LineAnalyzer to get
getDirname()[source]

Get the name of the directory where the data is written to

getTime()[source]

Get the execution time

hasAnalyzer(name)[source]
Parameters:name – name of the LineAnalyzer we ask for
lineHandle(line)[source]

Not to be called: calls the analyzer for the current line

listAnalyzers()[source]
Returns:A list with the names of the analyzers
picklePlots(wait=False)[source]

Writes the necessary information for the plots permanently to disc, so that it doesn’t have to be generated again :param wait: wait for the lock to be allowed to pickle

reset()[source]

reset the analyzer

setDataSet(data)[source]
tearDown()[source]