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

Class SolutionFile

source code

                object --+        
                         |        
Basics.Utilities.Utilities --+    
                             |    
           FileBasis.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 (and never will handle more because the ParsedParameterFile-class does a much better job)

Instance Methods [hide private]
 
__init__(self, directory, name)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
dimensionPattern(self)
pattern for the dimension string
source code
 
internalPatternUniform(self)
pattern for internal fields
source code
 
internalPattern(self)
pattern for internal fields
source code
 
internalPatternGeneral(self)
general pattern for internal fields
source code
 
valuePattern(self)
pattern for values
source code
 
stopPattern(self)
pattern that ends a boundary
source code
 
readBoundary(self, name)
read the value at a boundary
source code
 
replaceBoundary(self, name, newval)
write the value at a boundary
source code
 
readInternal(self)
read the value of the internal field
source code
 
readDimension(self)
read the dimension of the field
source code
 
getDimensionString(self)
builds a dimension string from the dimension information in the file
source code
 
readInternalUniform(self)
read the value of the internal field
source code
 
replaceInternal(self, newval)
overwrite the value of the internal field
source code
 
getContent(self, listLengthUnparsed=None)
Returns the parsed content of the file
source code

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

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 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

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

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

replaceInternal(self, newval)

source code 

overwrite the value of the internal field

newval - the new value