PyFoam.Basics.DataStructures module
Data structures in Foam-Files that can’t be directly represented by Python-Structures
- class PyFoam.Basics.DataStructures.BinaryBlob(data)[source]
Bases:
UnparsedRepresents a part of the file with binary data in it
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.BinaryList(lngth, data)[source]
Bases:
UnparsedListA class that represents a list that is saved as binary data
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.BoolProxy(val=None, textual=None)[source]
Bases:
objectWraps a boolean parsed from a file. Optionally stores a textual representation
- FalseStrings = ['off', 'no', 'false', 'invalid']
- TrueStrings = ['on', 'yes', 'true']
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'Wraps a boolean parsed from a file. Optionally stores a textual\n representation\n ', 'TrueStrings': ['on', 'yes', 'true'], 'FalseStrings': ['off', 'no', 'false', 'invalid'], '__init__': <function BoolProxy.__init__>, '__nonzero__': <function BoolProxy.__nonzero__>, '__bool__': <function BoolProxy.__bool__>, '__str__': <function BoolProxy.__str__>, '__repr__': <function BoolProxy.__repr__>, '__eq__': <function BoolProxy.__eq__>, '__ne__': <function BoolProxy.__ne__>, '__dict__': <attribute '__dict__' of 'BoolProxy' objects>, '__weakref__': <attribute '__weakref__' of 'BoolProxy' objects>, '__hash__': None, '__annotations__': {}})
- __hash__ = None
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.Codestream[source]
Bases:
strA class that encapsulates an codestream string
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'A class that encapsulates an codestream string', '__str__': <function Codestream.__str__>, '__dict__': <attribute '__dict__' of 'Codestream' objects>, '__weakref__': <attribute '__weakref__' of 'Codestream' objects>, '__annotations__': {}})
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.DictProxy[source]
Bases:
dictA class that acts like a dictionary, but preserves the order of the entries. Used to beautify the output
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'A class that acts like a dictionary, but preserves the order\n of the entries. Used to beautify the output', '__init__': <function DictProxy.__init__>, 'isRegexp': <function DictProxy.isRegexp>, '__setitem__': <function DictProxy.__setitem__>, '__getitem__': <function DictProxy.__getitem__>, '__delitem__': <function DictProxy.__delitem__>, '__deepcopy__': <function DictProxy.__deepcopy__>, '__contains__': <function DictProxy.__contains__>, '_DictProxy__enforceString': <function DictProxy.__enforceString>, 'update': <function DictProxy.update>, 'keys': <function DictProxy.keys>, '__iter__': <function DictProxy.__iter__>, '__str__': <function DictProxy.__str__>, 'iteritems': <function DictProxy.iteritems>, 'items': <function DictProxy.items>, 'addDecoration': <function DictProxy.addDecoration>, 'getDecoration': <function DictProxy.getDecoration>, 'getRegexpValue': <function DictProxy.getRegexpValue>, 'addRedirection': <function DictProxy.addRedirection>, '__dict__': <attribute '__dict__' of 'DictProxy' objects>, '__weakref__': <attribute '__weakref__' of 'DictProxy' objects>, '__annotations__': {}})
- __enforceString(v, toString)
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.DictRedirection(fullCopy, reference, name)[source]
Bases:
objectThis class is in charge of handling redirections to other directories
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'This class is in charge of handling redirections to other directories', '__init__': <function DictRedirection.__init__>, 'useAsRedirect': <function DictRedirection.useAsRedirect>, 'getContent': <function DictRedirection.getContent>, '__call__': <function DictRedirection.__call__>, '__str__': <function DictRedirection.__str__>, '__float__': <function DictRedirection.__float__>, 'keys': <function DictRedirection.keys>, '__dict__': <attribute '__dict__' of 'DictRedirection' objects>, '__weakref__': <attribute '__weakref__' of 'DictRedirection' objects>, '__annotations__': {}})
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.Dimension(*dims)[source]
Bases:
FoamDataType- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.Field(val, name=None, length=None)[source]
Bases:
FoamDataType- __annotations__ = {}
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.FixedLength(vals)[source]
Bases:
FoamDataType- __annotations__ = {}
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.FoamDataType[source]
Bases:
object- __annotations__ = {}
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__repr__': <function FoamDataType.__repr__>, '__eq__': <function FoamDataType.__eq__>, '__lt__': <function FoamDataType.__lt__>, '__ne__': <function FoamDataType.__ne__>, '__gt__': <function FoamDataType.__gt__>, '__ge__': <function FoamDataType.__ge__>, '__le__': <function FoamDataType.__le__>, '__dict__': <attribute '__dict__' of 'FoamDataType' objects>, '__weakref__': <attribute '__weakref__' of 'FoamDataType' objects>, '__doc__': None, '__hash__': None, '__annotations__': {}})
- __eq__(other)[source]
Implementation to make __cmp__ work again in Python3
Implementing this method means that these objects are not hashable. But that is OK
- __hash__ = None
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.SymmTensor(v1, v2, v3, v4, v5, v6)[source]
Bases:
FixedLength- __annotations__ = {}
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.Tensor(v1, v2, v3, v4, v5, v6, v7, v8, v9)[source]
Bases:
FixedLength- __annotations__ = {}
- __module__ = 'PyFoam.Basics.DataStructures'
- class PyFoam.Basics.DataStructures.TupleProxy(tup=())[source]
Bases:
listEnables Tuples to be manipulated
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'Enables Tuples to be manipulated', '__init__': <function TupleProxy.__init__>, '__dict__': <attribute '__dict__' of 'TupleProxy' objects>, '__weakref__': <attribute '__weakref__' of 'TupleProxy' objects>, '__annotations__': {}})
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.Unparsed(data)[source]
Bases:
objectA class that encapsulates an unparsed string
- __annotations__ = {}
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'A class that encapsulates an unparsed string', '__init__': <function Unparsed.__init__>, '__str__': <function Unparsed.__str__>, '__hash__': <function Unparsed.__hash__>, '__lt__': <function Unparsed.__lt__>, 'toNumpy': <function Unparsed.toNumpy>, '__dict__': <attribute '__dict__' of 'Unparsed' objects>, '__weakref__': <attribute '__weakref__' of 'Unparsed' objects>, '__annotations__': {}})
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.UnparsedList(lngth, data)[source]
Bases:
objectA class that encapsulates a list that was not parsed for performance reasons
- __annotations__ = {}
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.DataStructures', '__doc__': 'A class that encapsulates a list that was not parsed for\n performance reasons', '__init__': <function UnparsedList.__init__>, '__len__': <function UnparsedList.__len__>, '__cmp__': <function UnparsedList.__cmp__>, '__eq__': <function UnparsedList.__eq__>, '__lt__': <function UnparsedList.__lt__>, 'toNumpy': <function UnparsedList.toNumpy>, '__dict__': <attribute '__dict__' of 'UnparsedList' objects>, '__weakref__': <attribute '__weakref__' of 'UnparsedList' objects>, '__hash__': None, '__annotations__': {}})
- __hash__ = None
- __module__ = 'PyFoam.Basics.DataStructures'
- __weakref__
list of weak references to the object (if defined)
- class PyFoam.Basics.DataStructures.Vector(x, y, z)[source]
Bases:
FixedLength- __annotations__ = {}
- __module__ = 'PyFoam.Basics.DataStructures'