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

Class SolutionFile

Utilities --+    
            |    
    FileBasis --+
                |
               SolutionFile


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
Method Summary
  __init__(self, directory, name)
directory - name of the directory containing the solutions for a spcific time
  internalPattern(self)
pattern for internal fields
  makeTemp(self)
creates a temporary file (if the original is zipped, this is zipped too
  openFile(self)
opens the file (if zipped, the file is written zipped)
  readBoundary(self, name)
read the value at a boundary
  readInternal(self)
read the value of the internal field
  replaceBoundary(self, name, newval)
write the value at a boundary
  replaceInternal(self, newval)
overwrite the value of the internal field
  stopPattern(self)
pattern that ends a boundary
  valuePattern(self)
pattern for values
    Inherited from FileBasis
  closeFile(self)
closes the file
  copyRest(self, l, out)
Copy the rest of the file
  goMatch(self, l, exp, out, stop)
Read lines until a regular expression is matched
  goTo(self, l, s, out, echoLast, stop)
Read lines until a token is found
  purgeFile(self)
Undo all the manipulations done by PyFOAM
    Inherited from Utilities
  execute(self, cmd)
Execute the command cmd
  writeDictionaryHeader(self, f)
Writes a dummy header so OpenFOAM accepts the file as a dictionary

Class Variable Summary
    Inherited from FileBasis
str addedString = '//PyFoamAdded'
str removedString = '//PyFoamRemoved: '

Method Details

__init__(self, directory, name)
(Constructor)

directory - name of the directory containing the solutions for a spcific time

name - name of the field. If the field is zipped the .gz is appended
Overrides:
PyFoam.RunDictionary.FileBasis.FileBasis.__init__

internalPattern(self)

pattern for internal fields

makeTemp(self)

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

openFile(self)

opens the file (if zipped, the file is written zipped)
Overrides:
PyFoam.RunDictionary.FileBasis.FileBasis.openFile

readBoundary(self, name)

read the value at a boundary

name - the name of the boundary patch

readInternal(self)

read the value of the internal field

replaceBoundary(self, name, newval)

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

replaceInternal(self, newval)

overwrite the value of the internal field

newval - the new value

stopPattern(self)

pattern that ends a boundary

valuePattern(self)

pattern for values

Generated by Epydoc 2.1 on Fri Feb 3 11:00:33 2006 http://epydoc.sf.net