Package PyFoam :: Package Applications :: Module PyFoamApplication :: Class PyFoamApplication
[hide private]
[frames] | no frames]

Class PyFoamApplication

source code

object --+
         |
        PyFoamApplication

Instance Methods [hide private]
 
__init__(self, args=None, description=None, usage=None, interspersed=False, nr=None, changeVersion=True, exactNr=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
ensureGeneralOptions(self) source code
 
addOptions(self)
Add options to the parser
source code
 
run(self)
Run the real application
source code
 
error(self, *args)
Prints an error message and exits
source code
 
warning(self, *args)
Prints a warning message
source code
 
silent(self, *args)
Don't print a warning message
source code
 
checkCase(self, name, fatal=True, verbose=True)
Check whether this is a valid OpenFOAM-case
source code
 
addToCaseLog(self, name, *text)
Add information about the application that was run to the case-log
source code
 
addLocalConfig(self, directory=None)
Adds a local directory (assuming it is found)
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, args=None, description=None, usage=None, interspersed=False, nr=None, changeVersion=True, exactNr=True)
(Constructor)

source code 

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

Parameters:
  • description - description of the command
  • usage - Usage
  • interspersed - Is the command line allowed to be interspersed (options after the arguments)
  • args - Command line arguments when using the Application as a 'class' from a script
  • nr - Number of required arguments
  • changeVersion - May this application change the version of OF used?
  • exactNr - Must not have more than the required number of arguments
Overrides: object.__init__

error(self, *args)

source code 

Prints an error message and exits

Parameters:
  • args - Arguments that are to be printed

warning(self, *args)

source code 

Prints a warning message

Parameters:
  • args - Arguments that are to be printed

silent(self, *args)

source code 

Don't print a warning message

Parameters:
  • args - Arguments that are to be printed

checkCase(self, name, fatal=True, verbose=True)

source code 

Check whether this is a valid OpenFOAM-case

Parameters:
  • name - the directory-bame that is supposed to be the case
  • fatal - If this is not a case then the application ends
  • verbose - If this is not a case no warning is issued