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

Instance Methods [hide private]
  __init__(self, directory, name)
  openFile(self)
opens the file (if zipped, the file is written zipped)
  makeTemp(self)
creates a temporary file (if the original is zipped, this is zipped too
  dimensionPattern(self)
pattern for the dimension string
  internalPatternUniform(self)
pattern for internal fields
  internalPattern(self)
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: closeFile, copyRest, goMatch, goTo, makeString, parse, purgeFile, readFile, writeFile

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

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


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. If the field is zipped the .gz is appended
Overrides: FileBasis.FileBasis.__init__

openFile(self)

source code 
opens the file (if zipped, the file is written zipped)
Overrides: FileBasis.FileBasis.openFile

makeTemp(self)

source code 
creates a temporary file (if the original is zipped, this is zipped too
Overrides: FileBasis.FileBasis.makeTemp

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

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