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

Class ListFile

Utilities --+        
            |        
    FileBasis --+    
                |    
     SolutionFile --+
                    |
                   ListFile


Represents a OpenFOAM file with only a list
Method Summary
  __init__(self, place, name)
  getSize(self)
Return the size of the list
    Inherited from SolutionFile
  dimensionPattern(self)
pattern for the dimension string
  getDimensionString(self)
builds a dimension string from the dimension information in the file
  internalPattern(self)
pattern for internal fields
  internalPatternUniform(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
  readDimension(self)
read the dimension of the field
  readInternal(self)
read the value of the internal field
  readInternalUniform(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
  makeString(self)
Build a string from self.content, to be overriden by sub-classes
  parse(self, cnt)
Parse a string that is to be the content, to be overriden by the sub-classes
  purgeFile(self)
Undo all the manipulations done by PyFOAM
  readFile(self)
read the whole File into memory
  writeFile(self)
write the whole File from memory
    Inherited from Utilities
  execute(self, cmd, debug)
Execute the command cmd
  listDirectory(self, d)
Lists the files in a directory, but excludes certain names and files with certain endings
  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: '
    Inherited from Utilities
list excludeNames = ['^.svn$', '~$']

Method Details

__init__(self, place, name)
(Constructor)

Parameters:
place - directory of the file
name - The name of the list file
Overrides:
PyFoam.RunDictionary.SolutionFile.SolutionFile.__init__

getSize(self)

Returns:
the size of the list

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net