Package PyFoam :: Package LogAnalysis :: Module BoundingLogAnalyzer
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.LogAnalysis.BoundingLogAnalyzer

 1  #  ICE Revision: $Id: /local/openfoam/Python/PyFoam/PyFoam/LogAnalysis/BoundingLogAnalyzer.py 5717 2009-10-12T21:41:13.626022Z bgschaid  $  
 2  """Basic log analyer with boundedness""" 
 3   
 4  from StandardLogAnalyzer import StandardLogAnalyzer 
 5   
 6  from BoundingLineAnalyzer import GeneralBoundingLineAnalyzer 
 7  from SimpleLineAnalyzer import GeneralSimpleLineAnalyzer 
 8   
 9  from PyFoam.FoamInformation import foamVersionNumber 
10   
11 -class BoundingLogAnalyzer(StandardLogAnalyzer):
12 """ 13 This analyzer also checks for bounded solutions 14 """
15 - def __init__(self, 16 progress=False, 17 doTimelines=False, 18 doFiles=True, 19 singleFile=False, 20 startTime=None, 21 endTime=None):
22 """ 23 @param progress: Print time progress on console? 24 """ 25 StandardLogAnalyzer.__init__(self, 26 progress=progress, 27 doTimelines=doTimelines, 28 doFiles=doFiles, 29 singleFile=singleFile, 30 startTime=startTime, 31 endTime=endTime) 32 33 self.addAnalyzer("Bounding", 34 GeneralBoundingLineAnalyzer(doTimelines=doTimelines, 35 doFiles=doFiles, 36 singleFile=singleFile, 37 startTime=startTime, 38 endTime=endTime)) 39 40 if foamVersionNumber()<(1,4): 41 courantExpression="^Mean and max Courant Numbers = (.+) (.+)$" 42 else: 43 courantExpression="^Courant Number mean: (.+) max: (\S+).*$" 44 45 self.addAnalyzer("Courant", 46 GeneralSimpleLineAnalyzer("courant", 47 courantExpression, 48 titles=["mean","max"], 49 doTimelines=doTimelines, 50 doFiles=doFiles, 51 singleFile=singleFile, 52 startTime=startTime, 53 endTime=endTime))
54
55 -class BoundingPlotLogAnalyzer(BoundingLogAnalyzer):
56 """ 57 This analyzer also checks for bounded solutions 58 """
59 - def __init__(self):
60 BoundingLogAnalyzer.__init__(self, 61 progress=True, 62 doTimelines=True, 63 doFiles=False)
64 65 ## self.addAnalyzer("Bounding",GeneralBoundingLineAnalyzer()) 66 ## self.addAnalyzer("Courant",TimeLineSimpleLineAnalyzer("courant","^Mean and max Courant Numbers = (.+) (.+)$",titles=["mean","max"])) 67