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

Class SolutionFile

source code

                object --+        
                         |        
Basics.Utilities.Utilities --+    
                             |    
           FileBasis.FileBasis --+
                                 |
                                SolutionFile
Known Subclasses:
ListFile.ListFile

Solution data file

Represents a file with the solution data for one OpenFOAM-field at one point of time

Currently this can only handle uniform field values (and never will handle more because the ParsedParameterFile-class does a much better job)

Instance Methods [hide private]
  __init__(self, directory, name)
  dimensionPattern(self)
pattern for the dimension string
  internalPatternUniform(self)
pattern for internal fields
  internalPattern(self)
pattern for internal fields
  internalPatternGeneral(self)
general pattern for internal fields
  valuePattern(self)
pattern for values
  stopPattern(self)
pattern that ends a boundary
  readBoundary(self, name)
read the value at a boundary
  replaceBoundary(self, name, newval)
write the value at a boundary
  readInternal(self)
read the value of the internal field
  readDimension(self)
read the dimension of the field
  getDimensionString(self)
builds a dimension string from the dimension information in the file
  readInternalUniform(self)
read the value of the internal field
  replaceInternal(self, newval)
overwrite the value of the internal field

Inherited from FileBasis.FileBasis: __str__, closeFile, copyRest, goMatch, goTo, makeTemp, openFile, parse, purgeFile, readFile, writeFile

Inherited from Basics.Utilities.Utilities: execute, listDirectory, writeDictionaryHeader

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


Class Variables [hide private]

Inherited from FileBasis.FileBasis: addedString, removedString

Inherited from Basics.Utilities.Utilities: excludeNames


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, directory, name)
(Constructor)

source code 
Parameters:
  • directory - name of the directory containing the solutions for a specific time
  • name - name of the field.
Overrides: FileBasis.FileBasis.__init__

dimensionPattern(self)

source code 
pattern for the dimension string

internalPatternUniform(self)

source code 
pattern for internal fields

internalPattern(self)

source code 
pattern for internal fields

internalPatternGeneral(self)

source code 
general pattern for internal fields

valuePattern(self)

source code 
pattern for values

stopPattern(self)

source code 
pattern that ends a boundary

readBoundary(self, name)

source code 

read the value at a boundary

name - the name of the boundary patch

replaceBoundary(self, name, newval)

source code 
write the value at a boundary
Parameters:
  • name - the name of the boundary patch
  • newval - the new value

readInternal(self)

source code 
read the value of the internal field

readDimension(self)

source code 
read the dimension of the field

getDimensionString(self)

source code 
builds a dimension string from the dimension information in the file

readInternalUniform(self)

source code 
read the value of the internal field

replaceInternal(self, newval)

source code 

overwrite the value of the internal field

newval - the new value