Package PyFoam :: Package RunDictionary :: Module SampleDirectory :: Class SampleTime
[hide private]
[frames] | no frames]

Class SampleTime

source code

object --+
         |
        SampleTime

A directory with one sampled time

Instance Methods [hide private]
 
__init__(self, sDir, time)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
extractLine(self, fName)
Extract the name of the line from a filename
source code
 
extractValues(self, fName)
Extracts the names of the contained Values from a filename
source code
 
__getitem__(self, key)
Get the data for a value on a specific line
source code
 
determineIndex(self, fName, vName, data)
Determines the index of the data from the filename and a dataset
source code

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, sDir, time)
(Constructor)

source code 

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

Parameters:
  • sDir - The sample-dir
  • time - the timename
Overrides: object.__init__

__getitem__(self, key)
(Indexing operator)

source code 

Get the data for a value on a specific line

Parameters:
  • key - A tuple with the line-name and the value-name
Returns:
A SampleData-object

determineIndex(self, fName, vName, data)

source code 

Determines the index of the data from the filename and a dataset

Parameters:
  • fName - name of the file
  • vName - Name of the quantity
  • data - A list with the data
Returns:
A tuple of a boolean (whether the data is supposed to be a vector or a scalar) and an integer (the index of the data set - or the first component of the vector