-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathathena_slice.py
96 lines (83 loc) · 2.49 KB
/
athena_slice.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
OpenDatabase("localhost:./CylNewtZ8.*.vtk database", 0)
DefineScalarExpression("v1", "momentum[0]/density")
DefineScalarExpression("v2", "momentum[1]/density")
DefineScalarExpression("v3", "momentum[2]/density")
DefineVectorExpression("vel", "momentum/density")
DefineScalarExpression("b1", "cell_centered_B[0]")
DefineScalarExpression("b2", "cell_centered_B[1]")
DefineScalarExpression("b3", "cell_centered_B[2]")
SetWindowLayout(6)
n=1
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "b1", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
# Begin spontaneous state
View3DAtts = View3DAttributes()
View3DAtts.viewNormal = (-0.0254419, -0.999671, 0.00331183)
View3DAtts.focus = (2, 3.57628e-07, 0)
View3DAtts.viewUp = (0.0506917, 0.00201854, 0.998712)
View3DAtts.viewAngle = 30
View3DAtts.parallelScale = 3.33461
View3DAtts.nearPlane = -6.66921
View3DAtts.farPlane = 6.66921
View3DAtts.imagePan = (0, 0)
View3DAtts.imageZoom = 1
View3DAtts.perspective = 1
View3DAtts.eyeAngle = 2
View3DAtts.centerOfRotationSet = 0
View3DAtts.centerOfRotation = (2, 3.57628e-07, 0)
View3DAtts.axis3DScaleFlag = 0
View3DAtts.axis3DScales = (1, 1, 1)
View3DAtts.shear = (0, 0, 1)
SetView3D(View3DAtts)
DrawPlots()
#AddOperator("Slice", n)
n=2
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "b2", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
DrawPlots()
n=3
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "b3", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
DrawPlots()
n=4
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "v1", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
DrawPlots()
n=5
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "v2", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
DrawPlots()
n=6
SetActiveWindow(n)
ToggleLockTime()
ToggleLockViewMode()
AddPlot("Pseudocolor", "v3", 1,1)
PseudocolorAtts = PseudocolorAttributes()
PseudocolorAtts.limitsMode = PseudocolorAtts.CurrentPlot
SetPlotOptions(PseudocolorAtts)
DrawPlots()