Package PyFoam :: Module FoamInformation
[hide private]
[frames] | no frames]

Module FoamInformation

source code

Getting Information about the Foam-Installation (like the installation directory)

Functions [hide private]
string getPathFromEnviron(name)
Gets a path from an environment variable
  foamTutorials()
  foamMPI()
@return the used MPI-Implementation
  foamVersion()
  foamVersionNumber()
  foamInstalledVersions()
  changeFoamVersion(new)
Changes the used FoamVersion.

Imports: os.environ, os.path, os.listdir, popen2.popen4, re, Error.error, Error.warning, configuration, as, config


Function Details [hide private]

getPathFromEnviron(name)

source code 
Gets a path from an environment variable
Parameters:
  • name - the name of the environment variable
Returns: string
the path

foamTutorials()

source code 
Returns:
directory in which the tutorials reside

foamMPI()

source code 
@return the used MPI-Implementation

foamVersion()

source code 
Returns:
tuple that represents the Foam-version as found in $WM_PROJECT_VERSION

foamVersionNumber()

source code 
Returns:
tuple that represents the Foam-Version-Number (without strings

foamInstalledVersions()

source code 
Returns:
A list with the installed versions of OpenFOAM

changeFoamVersion(new)

source code 
Changes the used FoamVersion. Only valid during the runtime of the interpreter (the script or the Python session)
Parameters:
  • new - The new Version