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

Class OutFileCollection

source code

object --+
         |
        OutFileCollection

Collection of output files

The files are stored in a common directory and are created on first access

Each file can be identified by a unique name. If a file is accessed a second time at the same simulation-time a file with the ending _2 is created (incrementing with each access)

Instance Methods [hide private]
  __init__(self, basename, titles=[])
  setTitles(self, titles)
Sets the titles anew
  checkTime(self, time)
check whether the time has changed
  getFile(self, name)
get a OutputFile-object
  prevCalls(self, name)
checks whether the name was used previously at that time-step
  incrementCalls(self, name)
increments the access counter for name
  write(self, name, time, data)
writes data to file

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


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, basename, titles=[])
(Constructor)

source code 
Parameters:
  • basename - name of the base directory
  • titles - names of the data columns
Overrides: object.__init__

setTitles(self, titles)

source code 
Sets the titles anew
Parameters:
  • titles - the new titles

checkTime(self, time)

source code 
check whether the time has changed

getFile(self, name)

source code 
get a OutputFile-object

prevCalls(self, name)

source code 
checks whether the name was used previously at that time-step

incrementCalls(self, name)

source code 
increments the access counter for name

write(self, name, time, data)

source code 

writes data to file

name - name of the file time - simulation time data - tuple with the data