Changes between Version 82 and Version 83 of VisIt


Ignore:
Timestamp:
10/23/12 12:43:37 (12 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • VisIt

    v82 v83  
    9595
    9696# Redraw
     97DrawPlots()
     98}}}
     99[[CollapsibleEnd]]
     100[[CollapsibleStart(Average quantities over concentric spherical shells)]]
     101{{{
     102ActivateDatabase("localhost:/media/grassdata/erica/from_bluehive/FinalRunsNewest/BP/chombo00046.hdf")
     103filename = "average_vrad_00046.curve"
     104DeleteActivePlots()
     105AddPlot("Pseudocolor", "vrad", 1, 1)
     106SetActivePlots(0)
     107
     108# inner_sphere():
     109AddOperator("Clip", 1)
     110ClipAtts = ClipAttributes()
     111ClipAtts.quality = ClipAtts.Fast # Fast, Accurate
     112ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere
     113ClipAtts.plane1Status = 1
     114ClipAtts.plane2Status = 0
     115ClipAtts.plane3Status = 0
     116ClipAtts.plane1Origin = (0, 0, 0)
     117ClipAtts.plane2Origin = (0, 0, 0)
     118ClipAtts.plane3Origin = (0, 0, 0)
     119ClipAtts.plane1Normal = (1, 0, 0)
     120ClipAtts.plane2Normal = (0, 1, 0)
     121ClipAtts.plane3Normal = (0, 0, 1)
     122ClipAtts.planeInverse = 0
     123ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3
     124ClipAtts.center = (0, 0, 0)
     125ClipAtts.radius = 0.06
     126ClipAtts.sphereInverse = 1
     127SetOperatorOptions(ClipAtts, 1)
     128DrawPlots()
     129f = open(filename, "w")
     130f.write("# average_vrad\n")
     131#Query, write average:
     132Query("Average Value")
     133t2 = GetQueryOutputValue()
     134str = "%25.15e %25.15e\n" %(ClipAtts.radius, t2)
     135f.write(str)
     136RemoveAllOperators(1)
     137for i in range(48):
     138     dx=0.03
     139     #inner sphere:
     140     AddOperator("Clip", 1)
     141     ClipAtts = ClipAttributes()
     142     ClipAtts.quality = ClipAtts.Fast # Fast, Accurate
     143     ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere
     144     ClipAtts.plane1Status = 1
     145     ClipAtts.plane2Status = 0
     146     ClipAtts.plane3Status = 0
     147     ClipAtts.plane1Origin = (0, 0, 0)
     148     ClipAtts.plane2Origin = (0, 0, 0)
     149     ClipAtts.plane3Origin = (0, 0, 0)
     150     ClipAtts.plane1Normal = (1, 0, 0)
     151     ClipAtts.plane2Normal = (0, 1, 0)
     152     ClipAtts.plane3Normal = (0, 0, 1)
     153     ClipAtts.planeInverse = 0
     154     ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3
     155     ClipAtts.center = (0, 0, 0)
     156     ClipAtts.radius = 0.06 + i*dx
     157     ClipAtts.sphereInverse = 0
     158     SetOperatorOptions(ClipAtts, 1)
     159     #Outer-sphere:
     160     AddOperator("Clip", 1)
     161     ClipAtts = ClipAttributes()
     162     ClipAtts.quality = ClipAtts.Fast # Fast, Accurate
     163     ClipAtts.funcType = ClipAtts.Sphere # Plane, Sphere
     164     ClipAtts.plane1Status = 1
     165     ClipAtts.plane2Status = 0
     166     ClipAtts.plane3Status = 0
     167     ClipAtts.plane1Origin = (0, 0, 0)
     168     ClipAtts.plane2Origin = (0, 0, 0)
     169     ClipAtts.plane3Origin = (0, 0, 0)
     170     ClipAtts.plane1Normal = (1, 0, 0)
     171     ClipAtts.plane2Normal = (0, 1, 0)
     172     ClipAtts.plane3Normal = (0, 0, 1)
     173     ClipAtts.planeInverse = 0
     174     ClipAtts.planeToolControlledClipPlane = ClipAtts.Plane1 # None, Plane1, Plane2, Plane3
     175     ClipAtts.center = (0, 0, 0)
     176     ClipAtts.radius = 0.06 + (i+1)*dx
     177     ClipAtts.sphereInverse = 1
     178     SetOperatorOptions(ClipAtts, 1)
     179     DrawPlots()
     180     Query("Average Value")
     181     t2 = GetQueryOutputValue()
     182     str = "%25.15e %25.15e\n" %(ClipAtts.radius, t2)
     183     #Not sure how to differentiate clips..., would like the outer radius
     184     f.write(str)
     185     RemoveAllOperators(1)
     186f.close()
     187DeleteAllPlots()
     188OpenDatabase(filename)
     189AddPlot("Curve", "average_vrad")
    97190DrawPlots()
    98191}}}