PyFoam.Applications.CaseBuilderBackend module

Represents the actual CaseBuilder-File and other things that have to do with the Casebuilder

class PyFoam.Applications.CaseBuilderBackend.ArgWrapper(el)[source]

Bases: object

Wraps the argument element for convenient access

__dict__ = dict_proxy({'__module__': 'PyFoam.Applications.CaseBuilderBackend', '__getattr__': <function __getattr__>, '__dict__': <attribute '__dict__' of 'ArgWrapper' objects>, '__weakref__': <attribute '__weakref__' of 'ArgWrapper' objects>, '__doc__': 'Wraps the argument element for convenient access', '__init__': <function __init__>})
__getattr__(name)[source]
__init__(el)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.Applications.CaseBuilderBackend'
__weakref__

list of weak references to the object (if defined)

class PyFoam.Applications.CaseBuilderBackend.CaseBuilderDescriptionList[source]

Bases: object

Gets a list of the case-builder files found in the current path

__dict__ = dict_proxy({'__module__': 'PyFoam.Applications.CaseBuilderBackend', '__len__': <function __len__>, '__getitem__': <function __getitem__>, '__dict__': <attribute '__dict__' of 'CaseBuilderDescriptionList' objects>, '__weakref__': <attribute '__weakref__' of 'CaseBuilderDescriptionList' objects>, '__iter__': <function __iter__>, '__init__': <function __init__>, '__doc__': 'Gets a list of the case-builder files found in the current path'})
__getitem__(i)[source]
__init__()[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__()[source]
__len__()[source]
__module__ = 'PyFoam.Applications.CaseBuilderBackend'
__weakref__

list of weak references to the object (if defined)

class PyFoam.Applications.CaseBuilderBackend.CaseBuilderFile(fName)[source]

Bases: object

This class reads an XML-file that describes how to build a case and gives information about the case and if asked to builds the actual case

__dict__ = dict_proxy({'__module__': 'PyFoam.Applications.CaseBuilderBackend', 'initialDir': <function initialDir>, 'description': <function description>, 'fieldTree': <function fieldTree>, 'filesTree': <function filesTree>, 'argumentDict': <function argumentDict>, 'verifyArguments': <function verifyArguments>, 'groupArguments': <function groupArguments>, 'calculateVariables': <function calculateVariables>, 'getSingleElement': <function getSingleElement>, 'helpText': <function helpText>, 'argTree': <function argTree>, 'boundaryPatterns': <function boundaryPatterns>, '__dict__': <attribute '__dict__' of 'CaseBuilderFile' objects>, 'argumentGroupDescription': <function argumentGroupDescription>, 'argumentGroups': <function argumentGroups>, '__weakref__': <attribute '__weakref__' of 'CaseBuilderFile' objects>, 'makeBC': <function makeBC>, '__init__': <function __init__>, 'templatePath': <function templatePath>, 'boundaries': <function boundaries>, 'name': <function name>, 'buildCase': <function buildCase>, 'boundaryDescriptions': <function boundaryDescriptions>, 'expandVars': <function expandVars>, 'varTree': <function varTree>, 'arguments': <function arguments>, 'boundaryTree': <function boundaryTree>, 'argumentDescriptions': <function argumentDescriptions>, 'argumentDefaults': <function argumentDefaults>, 'parameterTree': <function parameterTree>, '__doc__': '\nThis class reads an XML-file that describes how to build a case\nand gives information about the case and if asked to builds the actual case\n', 'boundaryPatternDict': <function boundaryPatternDict>})
__init__(fName)[source]
Parameters:fName – the XML-file that describes how to build the case
__module__ = 'PyFoam.Applications.CaseBuilderBackend'
__weakref__

list of weak references to the object (if defined)

argTree()[source]
argumentDefaults()[source]
argumentDescriptions()[source]
argumentDict()[source]
argumentGroupDescription()[source]
argumentGroups()[source]
arguments()[source]
boundaries()[source]
boundaryDescriptions()[source]
boundaryPatternDict()[source]
boundaryPatterns()[source]
boundaryTree()[source]
buildCase(cName, args)[source]

Builds the case :param cName: The name of the case directory :param args: The arguments (as a dictionary)

calculateVariables(_args_)[source]

Add derived variables to the argument dictionary

description()[source]
expandVars(orig, keys=None)[source]
fieldTree()[source]
filesTree()[source]
getSingleElement(parent, name, optional=False)[source]

Get an element and check that it is the only one :param parent: the parent element :param name: The name of the element

groupArguments(name=None)[source]

Returns a list with the arguments belongin to a specific group :param name: Name of the group. If none is given, then all the arguments belonging to no group are returned

helpText()[source]
initialDir()[source]
makeBC(node, args)[source]
name()[source]
parameterTree()[source]
templatePath()[source]
varTree()[source]
verifyArguments(args)[source]

Validate the arguments with the provided code (if it exists)