Package PyFoam :: Package Basics :: Module FoamFileGenerator :: Class FoamFileGenerator
[hide private]
[frames] | no frames]

Class FoamFileGenerator

source code

object --+
         |
        FoamFileGenerator

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

Instance Methods [hide private]
 
__init__(self, data, header=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
turns the data into a string
source code
 
strPrimitive(self, pri) source code
 
strDict(self, dic, indent=0) source code
 
strList(self, lst, indent=0) source code
 
strTuple(self, lst, indent=0) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  primitiveTypes = [<class 'PyFoam.Basics.DataStructures.SymmTen...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data, header=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • data - data structure that will be turned into a Foam-compatible file
  • header - header information that is to be prepended
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

turns the data into a string

Overrides: object.__str__

Class Variable Details [hide private]

primitiveTypes

Value:
[<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'>]