Package PyFoam :: Package Infrastructure :: Module FoamServer :: Class FoamAnswerer
[hide private]
[frames] | no frames]

Class FoamAnswerer

source code

object --+
         |
        FoamAnswerer

The class that handles the actual requests (only needed to hide the Thread-methods from the world

Instance Methods [hide private]
  __init__(self, run=None, master=None, lines=100)
  _insertLine(self, line)
Inserts a new line, not to be called via XMLRPC
  isFoamServer(self)
This is a Foam-Server (True by default)
  isLiving(self)
The calculation still generates output and therefor seems to be living
  _kill(self)
Interrupts the FOAM-process
  stop(self)
Stops the run gracefully (after writing the last time-step to disk)
  argv(self)
Argument vector with which the runner was called
  usedArgv(self)
Argument vector with which the runner started the run
  isParallel(self)
Is it a parallel run?
  procNr(self)
How many processors are used?
  nrWarnings(self)
Number of warnings the executable emitted
  commandLine(self)
The command line
  actualCommandLine(self)
The actual command line used
  scriptName(self)
Name of the Python-Script that runs the show
  lastLine(self)
  tail(self)
  elapsedTime(self)
  getEnviron(self, name)
  mpi(self)
  foamVersion(self)
Version number of the Foam-Version
  pyFoamVersion(self)
  uname(self)
  ip(self)
  hostname(self)
  configuration(self)
  cwd(self)
  pid(self)
  user(self)
  id(self)
  time(self)
  createTime(self)
  _readParameter(self, name)
Reads a parametr from the controlDict
  startTime(self)
  endTime(self)
  deltaT(self)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, run=None, master=None, lines=100)
(Constructor)

source code 
Parameters:
  • run - The thread that controls the run
  • master - The Runner-Object that controls everything
  • lines - the number of lines the server should remember
Overrides: object.__init__

_insertLine(self, line)

source code 
Inserts a new line, not to be called via XMLRPC

isFoamServer(self)

source code 
This is a Foam-Server (True by default)

isLiving(self)

source code 
The calculation still generates output and therefor seems to be living

_kill(self)

source code 
Interrupts the FOAM-process

stop(self)

source code 
Stops the run gracefully (after writing the last time-step to disk)

argv(self)

source code 
Argument vector with which the runner was called

usedArgv(self)

source code 
Argument vector with which the runner started the run

isParallel(self)

source code 
Is it a parallel run?

procNr(self)

source code 
How many processors are used?

nrWarnings(self)

source code 
Number of warnings the executable emitted

commandLine(self)

source code 
The command line

actualCommandLine(self)

source code 
The actual command line used

scriptName(self)

source code 
Name of the Python-Script that runs the show

lastLine(self)

source code 
Returns:
the last line that was output by the running FOAM-process

tail(self)

source code 
Returns:
the current last lines as a string

elapsedTime(self)

source code 
Returns:
time in seconds since the last line was output

getEnviron(self, name)

source code 
Parameters:
  • name - name of an environment variable
Returns:
value of the variable, empty string if non-existing

mpi(self)

source code 
Returns:
name of the MPI-implementation

foamVersion(self)

source code 
Version number of the Foam-Version

pyFoamVersion(self)

source code 
Returns:
Version number of the PyFoam

uname(self)

source code 
Returns:
the complete uname-information

ip(self)

source code 
Returns:
the ip of this machine

hostname(self)

source code 
Returns:
The name of the computer

configuration(self)

source code 
Returns:
all the configured parameters

cwd(self)

source code 
Returns:
the current working directory

pid(self)

source code 
Returns:
the PID of the script

user(self)

source code 
Returns:
the user that runs this script

id(self)

source code 
Returns:
an ID for this run: IP and process-id

time(self)

source code 
Returns:
the current time in the simulation

createTime(self)

source code 
Returns:
the time in the simulation for which the mesh was created

_readParameter(self, name)

source code 
Reads a parametr from the controlDict
Parameters:
  • name - the parameter
Returns:
The value

startTime(self)

source code 
Returns:
parameter startTime from the controlDict

endTime(self)

source code 
Returns:
parameter endTime from the controlDict

deltaT(self)

source code 
Returns:
parameter startTime from the controlDict