PyFoam.Execution.BasicRunner module¶
Run a OpenFOAM command
-
class
PyFoam.Execution.BasicRunner.
BasicRunner
(argv=None, silent=False, logname=None, compressLog=False, lam=None, server=False, restart=False, noLog=False, logTail=None, remark=None, jobId=None, parameters=None, writeState=True, echoCommandLine=None)[source]¶ Bases:
object
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
-
__dict__
= dict_proxy({'runOK': <function runOK>, 'stopWithoutWrite': <function stopWithoutWrite>, '__module__': 'PyFoam.Execution.BasicRunner', 'writeLastSeen': <function writeLastSeen>, 'writeNowTime': <function writeNowTime>, '_writeStopAt': <function _writeStopAt>, '__dict__': <attribute '__dict__' of 'BasicRunner' objects>, 'stopGracefully': <function stopGracefully>, 'logName': <function logName>, 'appendTailLine': <function appendTailLine>, 'writeResults': <function writeResults>, 'writeTheState': <function writeTheState>, 'getSolutionDirectory': <function getSolutionDirectory>, '__weakref__': <attribute '__weakref__' of 'BasicRunner' objects>, '__init__': <function __init__>, 'writeStartTime': <function writeStartTime>, 'lineHandle': <function lineHandle>, 'stopAtNextWrite': <function stopAtNextWrite>, 'startHandle': <function startHandle>, 'stopHandle': <function stopHandle>, 'start': <function start>, 'writeTailLog': <function writeTailLog>, 'addEndTrigger': <function addEndTrigger>, 'writeToStateFile': <function writeToStateFile>, '__doc__': 'Base class for the running of commands\n\n When the command is run the output is copied to a LogFile and\n (optionally) standard-out\n\n The argument list assumes for the first three elements the\n OpenFOAM-convention:\n\n <cmd> <dir> <case>\n\n The directory name for outputs is therefor created from <dir> and\n <case>\n\n Provides some handle-methods that are to be overloaded for\n additional functionality'})¶
-
__init__
(argv=None, silent=False, logname=None, compressLog=False, lam=None, server=False, restart=False, noLog=False, logTail=None, remark=None, jobId=None, parameters=None, writeState=True, echoCommandLine=None)[source]¶ Parameters: argv – list with the tokens that are the command line if not set the standard command line is used :param silent: if True no output is sent to stdout :param logname: name of the logfile :param compressLog: Compress the logfile into a gzip :param lam: Information about a parallel run :param server: Whether or not to start the network-server :type lam: PyFoam.Execution.ParallelExecution.LAMMachine :param noLog: Don’t output a log file :param logTail: only the last lines of the log should be written :param remark: User defined remark about the job :param parameters: User defined dictionary with parameters for
documentation purposesParameters: - jobId – Job ID of the controlling system (Queueing system)
- writeState – Write the state to some files in the case
- echoCommandLine – Prefix that is printed with the command line. If unset nothing is printed
-
__module__
= 'PyFoam.Execution.BasicRunner'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
addEndTrigger
(f)[source]¶ Parameters: f – A function that is to be executed at the end of the simulation
-
-
class
PyFoam.Execution.BasicRunner.
BasicRunnerCheck
[source]¶ Bases:
object
A small class that does primitve checking for BasicRunner Duplicates other efforts, but ….
-
__dict__
= dict_proxy({'__dict__': <attribute '__dict__' of 'BasicRunnerCheck' objects>, '__module__': 'PyFoam.Execution.BasicRunner', '__init__': <function __init__>, 'getCreateTime': <function getCreateTime>, 'getTime': <function getTime>, '__weakref__': <attribute '__weakref__' of 'BasicRunnerCheck' objects>, 'controlDictRead': <function controlDictRead>, '__doc__': 'A small class that does primitve checking for BasicRunner\n Duplicates other efforts, but ....', 'floatRegExp': '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'})¶
-
__module__
= 'PyFoam.Execution.BasicRunner'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
floatRegExp
= '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'¶
-