butterfly.parser module¶
OpenFOAM/c++ dictionary parser.
-
class
butterfly.parser.
CppDictParser
(text)[source]¶ Bases:
object
Parse OpenFOAM dictionary to Python dictionary.
Use values property to get the dictionary.
-
text
¶ OpenFOAM dictionary as a single multiline string.
-
values
¶ Get OpenFOAM dictionary values as a python dictionary.
-
-
class
butterfly.parser.
ResidualParser
(filepath, parse=True)[source]¶ Bases:
object
Paeser for residual values from a log file.
-
filepath
¶ Full file path to .log file.
-
parser
¶ If ture Parser will start parsing the values once initiated.
-
residuals
¶ Get residuals as a dictionary.
-
time_range
¶ Get time range as a tuple.
-