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
-
_FoamFileGenerator__quoteString
(val)¶ Quote the string if it contains illegal characters
-
__dict__
= dict_proxy({'strPrimitive': <function strPrimitive>, '__module__': 'PyFoam.Basics.FoamFileGenerator', '__str__': <function __str__>, 'makeString': <function makeString>, '_FoamFileGenerator__quoteString': <function __quoteString>, 'strDict': <function strDict>, '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'>], 'strTuple': <function strTuple>, '__dict__': <attribute '__dict__' of 'FoamFileGenerator' objects>, 'strList': <function strList>, '__weakref__': <attribute '__weakref__' of 'FoamFileGenerator' objects>, '__doc__': 'Class that generates a OpenFOAM-compatible representation of a\n data-structure', '__init__': <function __init__>})¶
-
__init__
(data, header=None, longListThreshold=20, useFixedType=True)[source]¶ Parameters: data – data structure that will be turned into a Foam-compatible file :param header: header information that is to be prepended :param longListThreshold: Threshold for lists before they are considered long. This means that they are prefixed with the number of elements. If the threshold is 0 or None then no list is considered long
-
__module__
= 'PyFoam.Basics.FoamFileGenerator'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
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'>]¶
-
-
exception
PyFoam.Basics.FoamFileGenerator.
FoamFileGeneratorError
(descr)[source]¶ Bases:
PyFoam.Error.PyFoamException
-
__module__
= 'PyFoam.Basics.FoamFileGenerator'¶
-