-
Notifications
You must be signed in to change notification settings - Fork 3
/
visualiseBurgersStatic.cmgui
52 lines (40 loc) · 1.78 KB
/
visualiseBurgersStatic.cmgui
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
#gfx read node burgers_static.part0.exnode;
#gfx read elem burgers_static.part0.exelem;
$dt=1; # frequency
$steps=100; # number of time steps
$cores=1; # number of processors
$w=500; # width of the graphical window
$h=1000; # height of the graphical window
#Read in the sequence of nodal positions.
for($i=0; $i < $steps; $i=$i+$dt)
{
$time = $i/$dt
for ($j=0; $j < $cores; $j=$j+1)
{
$filename = sprintf("./output/MainTime_%01d.part%01d.exnode", $i, $j);
print "Reading $filename time $time\n";
gfx read node "$filename" time $i;
#$filename = sprintf("./Burgers_%d.jpg", $i);
#gfx print window 1 jpg file "$filename" height 1000 width 1000
}
}
#Read in the element description
for ($k=0;$k<$cores;$k=$k+1)
{
$filename = sprintf("./output/MainTime_0.part%01d.exelem", $k);
gfx read element "$filename";
}
gfx define faces egroup BurgersRegion
gfx define field velocities component U.1
gfx define field magnitude_velocity magnitude field velocities
gfx create spectrum flow
gfx modify spectrum flow clear overwrite_colour
gfx modify spectrum flow linear reverse range 0.0 1.00 extend_above extend_below rainbow colour_range 0 1
gfx create window 1
gfx modify window 1 layout simple height $h width $w;
gfx modify g_element BurgersRegion node_points label U glyph arrow_solid general size "0.03*0.03*0.03" centre 0,0,0 font default orientation velocities select_on material default data magnitude_velocity scale_factors "0.1*0.05*0.05" selected_material default_selected spectrum flow
gfx edit scene
#Set the timekeeper playing
gfx timekeeper default set 1.0;
gfx timekeeper default speed 1;
gfx create time_editor