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

Class SampleTime

source code


A directory with one sampled time

Instance Methods [hide private]
 
__getitem__(self, key)
Get the data for a value on a specific line
source code
 
__init__(self, sDir, time, postfixes=[], prefixes=[], valueNames=None, namesFromFirstLine=False, linePattern=None, needsExtension=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
determineIndex(self, fName, vName, data)
Determines the index of the data from the filename and a dataset
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

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__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

__init__(self, sDir, time, postfixes=[], prefixes=[], valueNames=None, namesFromFirstLine=False, linePattern=None, needsExtension=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • sDir - The sample-dir
  • time - the timename
  • postfixes - list of possible extensions to a field name of the form name_postfix to help splitting such field names.
  • prefixes - list of possible extensions to a field name of the form prefix_name to help splitting such field names
Overrides: object.__init__

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