2 if not ('servermanager' in dir()):
7 def demo10(fname, impth):
8 """This method demonstrates the Contour filter."""
10 reader = ExodusIIReader(FileName=fname)
12 ##Show(reader, view=v)
13 contourFilter = Contour(reader)
14 contourFilter.ContourBy = 'Temp'
15 contourFilter.Isosurfaces
18 contourFilter.Isosurfaces = [400]
19 camera = GetActiveCamera()
20 camera.Position = [0., 60., -33]
23 dp2 = GetDisplayProperties(contourFilter)
24 contourFilter.PointData[:]
25 ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
27 temp = contourFilter.PointData[0]
29 ## (399.99999999999994, 400.00000000000006)
31 dp2.LookupTable = MakeBlueToRedLT(399.999,400)
32 dp2.ColorAttributeType = 'POINT_DATA'
33 dp2.ColorArrayName = 'Temp'
35 WriteImage(filename = (impth + "contourFilter_1.png"), view=v, Magnification=2)
37 pres = contourFilter.PointData[2]
39 ##(0.0074376024368978605, 0.02845284189526591)
41 dp2.LookupTable = MakeBlueToRedLT(0.007437602, 0.02845284)
42 dp2.ColorArrayName = 'Pres'
44 WriteImage(filename = (impth + "contourFilter_2.png"), view=v, Magnification=2)
46 dp1 = GetDisplayProperties(reader)
47 dp1.Representation = 'Wireframe'
48 dp1.LookupTable = dp2.LookupTable
49 dp1.ColorAttributeType = 'POINT_DATA'
50 dp1.ColorArrayName = 'Pres'
55 camera.Elevation(-150)
57 WriteImage(filename = (impth + "contourFilter_3.png"), view=v, Magnification=2)
60 testdir = os.getenv("TESTDIR")
61 pvdata = os.getenv("PVDATA")
63 if __name__ == "__main__":
64 demo10(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")