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__
= mappingproxy({'__module__': 'PyFoam.Basics.FoamFileGenerator', '__doc__': 'Class that generates a OpenFOAM-compatible representation of a\n data-structure', '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'>], '__init__': <function FoamFileGenerator.__init__>, '__str__': <function FoamFileGenerator.__str__>, '_FoamFileGenerator__quoteString': <function FoamFileGenerator.__quoteString>, 'makeString': <function FoamFileGenerator.makeString>, 'strPrimitive': <function FoamFileGenerator.strPrimitive>, 'strDict': <function FoamFileGenerator.strDict>, 'strList': <function FoamFileGenerator.strList>, 'strTuple': <function FoamFileGenerator.strTuple>, '__dict__': <attribute '__dict__' of 'FoamFileGenerator' objects>, '__weakref__': <attribute '__weakref__' of 'FoamFileGenerator' objects>})¶
-
__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'¶
-