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)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_insertLine(self, line)
Inserts a new line, not to be called via XMLRPC
source code
 
isFoamServer(self)
This is a Foam-Server (True by default)
source code
 
isLiving(self)
The calculation still generates output and therefor seems to be living
source code
 
_kill(self)
Interrupts the FOAM-process
source code
 
stop(self)
Stops the run gracefully (after writing the last time-step to disk)
source code
 
write(self)
Makes the program write the next time-step to disk and the continue
source code
 
argv(self)
Argument vector with which the runner was called
source code
 
usedArgv(self)
Argument vector with which the runner started the run
source code
 
isParallel(self)
Is it a parallel run?
source code
 
procNr(self)
How many processors are used?
source code
 
nrWarnings(self)
Number of warnings the executable emitted
source code
 
commandLine(self)
The command line
source code
 
actualCommandLine(self)
The actual command line used
source code
 
scriptName(self)
Name of the Python-Script that runs the show
source code
 
lastLine(self)
Returns: the last line that was output by the running FOAM-process
source code
 
tail(self)
Returns: the current last lines as a string
source code
 
elapsedTime(self)
Returns: time in seconds since the last line was output
source code
 
getEnviron(self, name)
Returns: value of the variable, empty string if non-existing
source code
 
mpi(self)
Returns: name of the MPI-implementation
source code
 
foamVersion(self)
Version number of the Foam-Version
source code
 
pyFoamVersion(self)
Returns: Version number of the PyFoam
source code
 
uname(self)
Returns: the complete uname-information
source code
 
ip(self)
Returns: the ip of this machine
source code
 
hostname(self)
Returns: The name of the computer
source code
 
configuration(self)
Returns: all the configured parameters
source code
 
cwd(self)
Returns: the current working directory
source code
 
pid(self)
Returns: the PID of the script
source code
 
user(self)
Returns: the user that runs this script
source code
 
id(self)
Returns: an ID for this run: IP and process-id
source code
 
time(self)
Returns: the current time in the simulation
source code
 
createTime(self)
Returns: the time in the simulation for which the mesh was created
source code
 
_readParameter(self, name)
Reads a parametr from the controlDict
source code
 
startTime(self)
Returns: parameter startTime from the controlDict
source code
 
endTime(self)
Returns: parameter endTime from the controlDict
source code
 
deltaT(self)
Returns: parameter startTime from the controlDict
source code

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 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

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__

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

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