PyFoam.Basics.FoamFileGenerator module

Transform a Python data-structure into a OpenFOAM-File-Representation

class PyFoam.Basics.FoamFileGenerator.FoamFileGenerator(data, header=None, longListThreshold=20, useFixedType=True)[source]

Bases: object

Class that generates a OpenFOAM-compatible representation of a data-structure

makeString(firstLevel=False)[source]

turns the data into a string

primitiveTypes = [<class 'PyFoam.Basics.DataStructures.SymmTensor'>, <class 'PyFoam.Basics.DataStructures.Tensor'>, <class 'PyFoam.Basics.DataStructures.Vector'>, <class 'PyFoam.Basics.DataStructures.Dimension'>, <class 'PyFoam.Basics.DataStructures.Field'>, <class 'PyFoam.Basics.DataStructures.Unparsed'>]
strDict(dic, indent=0, firstLevel=False)[source]
strList(lst, indent=0)[source]
strPrimitive(pri)[source]
strTuple(lst, indent=0)[source]
exception PyFoam.Basics.FoamFileGenerator.FoamFileGeneratorError(descr)[source]

Bases: PyFoam.Error.PyFoamException

PyFoam.Basics.FoamFileGenerator.makeString(data)[source]