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
source code
 
foamTutorials()
Returns: directory in which the tutorials reside
source code
 
foamMPI()
Returns: the used MPI-Implementation
source code
 
foamVersionString(useConfigurationIfNoInstallation=False)
Returns: string for the Foam-version as found in $WM_PROJECT_VERSION
source code
 
foamVersion(useConfigurationIfNoInstallation=False)
Returns: tuple that represents the Foam-version as found in $WM_PROJECT_VERSION
source code
 
foamVersionNumber(useConfigurationIfNoInstallation=False)
Returns: tuple that represents the Foam-Version-Number (without strings
source code
 
oldAppConvention()
Returns true if the version of OpenFOAM is older than 1.5 and it therefor uses the 'old' convention to call utilities ("dot, case")
source code
 
oldTutorialStructure()
Returns true if the version of OpenFOAM is older than 1.6 and it therefor uses the 'old' (flat) structure for the tutorials
source code
 
foamInstalledVersions()
Returns: A list with the installed versions of OpenFOAM
source code
 
changeFoamVersion(new, force64=False, force32=False, compileOption=None)
Changes the used FoamVersion.
source code
 
injectVariables(script, forceArchOption=None, compileOption=None)
Executes a script in a subshell and changes the current environment with the enivironment after the execution
source code
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 
Returns:
the used MPI-Implementation

foamVersionString(useConfigurationIfNoInstallation=False)

source code 
Returns:
string for the Foam-version as found in $WM_PROJECT_VERSION

foamVersion(useConfigurationIfNoInstallation=False)

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

foamVersionNumber(useConfigurationIfNoInstallation=False)

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, force64=False, force32=False, compileOption=None)

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
  • force64 - Forces the 64-bit-version to be chosen
  • force32 - Forces the 32-bit-version to be chosen
  • compileOption - Forces Debug or Opt

injectVariables(script, forceArchOption=None, compileOption=None)

source code 

Executes a script in a subshell and changes the current environment with the enivironment after the execution

Parameters:
  • script - the script that is executed
  • forceArchOption - To which architecture Option should be forced
  • compileOption - to which value the WM_COMPILE_OPTION should be forced