PyFoam.RunDictionary.ParsedBlockMeshDict module

A parsed blockMeshDict

class PyFoam.RunDictionary.ParsedBlockMeshDict.ParsedBlockMeshDict(name, backup=False, debug=False, doMacroExpansion=False)[source]

Bases: PyFoam.RunDictionary.ParsedParameterFile.ParsedParameterFile

A parsed version of a blockMeshDict-file. Adds some convenience-methods to access parts of the file

__init__(name, backup=False, debug=False, doMacroExpansion=False)[source]
Parameters
  • name – The name of the parameter file

  • backup – create a backup-copy of the file

  • boundaryDict – the file to parse is a boundary file

  • listDict – the file only contains a list

  • listDictWithHeader – the file only contains a list and a header

  • listLengthUnparsed – Lists longer than that length are not parsed

  • binaryMode – Parse long lists in binary mode (to be overridden by

the settings in the header). :param treatBinaryAsASCII: even if the header says that this is a binary file treat it like an ASCII-file :param noHeader: don’t expect a header :param noBody: don’t read the body of the file (only the header) :param doMacroExpansion: expand #include and $var :param noVectorOrTensor: short lists of length 3, 6 an 9 are NOT interpreted as vectors or tensors :param dontRead: Do not read the file during construction :param longListOutputThreshold: Lists that are longer than this are prefixed with a length :param dictStack: dictionary stack for lookup (only used for include)

__module__ = 'PyFoam.RunDictionary.ParsedBlockMeshDict'
arcs()[source]
blocks()[source]

Returns a list with the 8 vertices that define each block

convertToMeters()[source]
getBounds()[source]
patches()[source]

Returns a dictionary with lists of 4-tuples that define each patch

typicalLength()[source]
vertices()[source]