PyFoam.RunDictionary.TimeDirectory module
Working with direcotries from a time-step
- class PyFoam.RunDictionary.TimeDirectory.TimeDirectory(name, time, create=False, region=None, processor=None, tolerant=False, yieldParsedFiles=False)[source]
Bases:
objectRepresents a directory for a timestep
- __dict__ = mappingproxy({'__module__': 'PyFoam.RunDictionary.TimeDirectory', '__doc__': 'Represents a directory for a timestep', '__init__': <function TimeDirectory.__init__>, 'baseName': <function TimeDirectory.baseName>, 'reread': <function TimeDirectory.reread>, 'getFiles': <function TimeDirectory.getFiles>, '__contains__': <function TimeDirectory.__contains__>, '__len__': <function TimeDirectory.__len__>, '__getitem__': <function TimeDirectory.__getitem__>, '_TimeDirectory__remove': <function TimeDirectory.__remove>, '__delitem__': <function TimeDirectory.__delitem__>, '__setitem__': <function TimeDirectory.__setitem__>, '__iter__': <function TimeDirectory.__iter__>, 'clear': <function TimeDirectory.clear>, 'copy': <function TimeDirectory.copy>, '__dict__': <attribute '__dict__' of 'TimeDirectory' objects>, '__weakref__': <attribute '__weakref__' of 'TimeDirectory' objects>, '__annotations__': {}})
- __init__(name, time, create=False, region=None, processor=None, tolerant=False, yieldParsedFiles=False)[source]
- Parameters:
name – name of the case directory
time – time in the directory
create – Create the directory if it does not exist
tolerant – Do not fail if there are inconsistencies
region – The mesh region for multi-region cases
yieldParsedFiles – let the iterator return PasedParameterFile objects instead of SolutionFile
- __module__ = 'PyFoam.RunDictionary.TimeDirectory'
- __remove(key)
- __weakref__
list of weak references to the object (if defined)
- copy(orig, purge=False, overwrite=True, mustExist=False, exclude=[], include=['*'])[source]
Copy SolutionFiles from another TimeDirectory to the current TimeDirectory. Returns a list with the copied values :param orig: the TimeDirectory with the original files :param purge: remove all current files in this directory :param overwrite: if the file already exists it is overwritten :param mustExist: only if the file already exists it is overwritten :param exclude: List of fnmatch-patterns that should be excluded (Default: none) :param include: List of fnmatch-patterns that should be included (Default: all)