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

Initialize self. See help(type(self)) for accurate 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__ = mappingproxy({'__module__': 'PyFoam.Applications.CaseBuilderBackend', '__doc__': 'Gets a list of the case-builder files found in the current path', '__init__': <function CaseBuilderDescriptionList.__init__>, '__iter__': <function CaseBuilderDescriptionList.__iter__>, '__len__': <function CaseBuilderDescriptionList.__len__>, '__getitem__': <function CaseBuilderDescriptionList.__getitem__>, '__dict__': <attribute '__dict__' of 'CaseBuilderDescriptionList' objects>, '__weakref__': <attribute '__weakref__' of 'CaseBuilderDescriptionList' objects>})
__getitem__(i)[source]
__init__()[source]

Initialize self. See help(type(self)) for accurate 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__ = mappingproxy({'__module__': 'PyFoam.Applications.CaseBuilderBackend', '__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', '__init__': <function CaseBuilderFile.__init__>, 'name': <function CaseBuilderFile.name>, 'description': <function CaseBuilderFile.description>, 'helpText': <function CaseBuilderFile.helpText>, 'argTree': <function CaseBuilderFile.argTree>, 'varTree': <function CaseBuilderFile.varTree>, 'filesTree': <function CaseBuilderFile.filesTree>, 'boundaryTree': <function CaseBuilderFile.boundaryTree>, 'fieldTree': <function CaseBuilderFile.fieldTree>, 'parameterTree': <function CaseBuilderFile.parameterTree>, 'templatePath': <function CaseBuilderFile.templatePath>, 'initialDir': <function CaseBuilderFile.initialDir>, 'expandVars': <function CaseBuilderFile.expandVars>, 'boundaries': <function CaseBuilderFile.boundaries>, 'boundaryPatterns': <function CaseBuilderFile.boundaryPatterns>, 'boundaryPatternDict': <function CaseBuilderFile.boundaryPatternDict>, 'boundaryDescriptions': <function CaseBuilderFile.boundaryDescriptions>, 'argumentGroups': <function CaseBuilderFile.argumentGroups>, 'argumentGroupDescription': <function CaseBuilderFile.argumentGroupDescription>, 'arguments': <function CaseBuilderFile.arguments>, 'argumentDict': <function CaseBuilderFile.argumentDict>, 'groupArguments': <function CaseBuilderFile.groupArguments>, 'argumentDescriptions': <function CaseBuilderFile.argumentDescriptions>, 'argumentDefaults': <function CaseBuilderFile.argumentDefaults>, 'getSingleElement': <function CaseBuilderFile.getSingleElement>, 'makeBC': <function CaseBuilderFile.makeBC>, 'verifyArguments': <function CaseBuilderFile.verifyArguments>, 'calculateVariables': <function CaseBuilderFile.calculateVariables>, 'buildCase': <function CaseBuilderFile.buildCase>, '__dict__': <attribute '__dict__' of 'CaseBuilderFile' objects>, '__weakref__': <attribute '__weakref__' of 'CaseBuilderFile' objects>})
__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)