Package PyFoam :: Package Infrastructure :: Module ClusterJob :: Class PrepareCaseJob
[hide private]
[frames] | no frames]

Class PrepareCaseJob

source code


Assumes that the case is prepared to be set up with =pyFoamPrepareCase.py= and automatically sets it up with this. Needs one parameterfile to be specified and then a list of name/value-pairs

Instance Methods [hide private]
 
__init__(self, basename, solver, parameterfile, arguments, parameters={}, **kwargs)
Initializes the Job
source code
 
setup(self, parameters)
Set up the job.
source code

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

    Inherited from SolverJob
 
run(self, parameters)
Run the actual job.
source code
    Inherited from ClusterJob
 
additionalParameters(self)
Additional parameters
source code
 
additionalReconstruct(self, parameters)
Additional reconstruction of parallel runs (Stuff that the OpenFOAM-reconstructPar doesn't do
source code
 
autoDecompose(self)
Automatically decomposes the grid with a metis-algorithm
source code
 
autoReconstruct(self)
Default reconstruction of a parallel run
source code
 
casedir(self)
Returns the actual directory of the case To be overridden if appropriate
source code
 
casename(self)
Returns just the name of the case
source code
 
checkpointFile(self)
The file that makes the job write a checkpoint
source code
 
cleanup(self, parameters)
Clean up after a job
source code
 
doIt(self)
The central logic.
source code
 
execute(self, cmd)
Execute a shell command in the case directory.
source code
 
foamRun(self, application, args=[], foamArgs=[], steady=False, multiRegion=True, progress=False, compress=False, noLog=False)
Runs a foam utility on the case.
source code
 
fullJobId(self)
Return a string with the full job-ID
source code
 
jobFile(self)
The file with the job information
source code
 
message(self, *txt) source code
 
postDecomposeSetup(self, parameters)
Additional setup, to be executed when the grid is already decomposed
source code
 
preReconstructCleanup(self, parameters)
Additional cleanup, to be executed when the grid is still decomposed
source code
 
setState(self, txt) source code
 
stopFile(self)
The file that makes the job write a checkpoint and end
source code
 
stopJob(self) source code
 
taskParameters(self, id)
Parameters for a specific task
source code
 
templateFile(self, fileName)
Looks for a template file and evaluates the template using the usual parameters
source code
 
writeCheckpoint(self) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, basename, solver, parameterfile, arguments, parameters={}, **kwargs)
(Constructor)

source code 

Initializes the Job

Parameters:
  • template - Name of the template-case. It is assumed that it resides in the same directory as the actual case
  • cloneParameters - a list with additional parameters for the CloneCase-object that copies the template
  • solverProgress - Only writes the current time of the solver
Overrides: object.__init__
(inherited documentation)

setup(self, parameters)

source code 

Set up the job. Called in the beginning if the job has not been restarted

Usual tasks include grid conversion/setup, mesh decomposition etc

Parameters:
  • parameters - a dictionary with parameters
Overrides: ClusterJob.setup
(inherited documentation)