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

Class BasicRunner

Known Subclasses:
AnalyzedRunner, GnuplotRunner, StepAnalyzedRunner

Base class for the running of commands

When the command is run the output is copied to a LogFile and (optionally) standard-out

The argument list assumes for the first three elements the OpenFOAM-convention:

<cmd> <dir> <case>

The directory name for outputs is therefor created from <dir> and <case>

Provides some handle-methods that are to be overloaded for additional functionality
Method Summary
  __init__(self, argv, silent, logname, lam, server)
PyFoam.RunDictionary.SolutionDirectory getSolutionDirectory(self, archive)
Return the directory of the case
  lineHandle(self, line)
called every time a new line is read
  logName(self)
Get the name of the logfiles
  runOK(self)
checks whether the run was successful
  start(self)
starts the command and stays with it till the end
  startHandle(self)
to be called before the program is started
  stopHandle(self)
called after the program has stopped

Method Details

__init__(self, argv=None, silent=False, logname='PyFoam', lam=None, server=False)
(Constructor)

Parameters:
argv - list with the tokens that are the command line if not set the standard command line is used
silent - if True no output is sent to stdout
logname - name of the logfile
lam - Information about a parallel run
           (type=PyFoam.Execution.ParallelExecution.LAMMachine)
server - Whether or not to start the network-server

getSolutionDirectory(self, archive=None)

Parameters:
archive - Name of the directory for archiving results
Returns:
The directory of the case
           (type=PyFoam.RunDictionary.SolutionDirectory)

lineHandle(self, line)

called every time a new line is read

logName(self)

Get the name of the logfiles

runOK(self)

checks whether the run was successful

start(self)

starts the command and stays with it till the end

startHandle(self)

to be called before the program is started

stopHandle(self)

called after the program has stopped

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