This example shows how to read in multiple sets of nodal values at different times and display these with a single definition of the elements. The graphics update with time keeper.
# Interactively displaying time varying meshes # -------------------------------------------- # # Read in the undeformed positions gfx read node $example/undeformed_cube.exnode; # Read in the deformed positions at different times gfx read node $example/deformed_cube.exnode time 1; gfx read node $example/deformed_cube3.exnode time 2; gfx read node $example/deformed_cube2.exnode time 3; #The differing values are all stored in an array. gfx lis node 8; #Read in a constant element definition. These cannot #currently change with time. gfx read element $example/deformed_cube.exelem; gfx read element $example/undeformed_cube.exelem; #Define a magnitude computed field. gfx def field mag magnitude field deformed_coordinates; #Extend the range of the default spectrum. gfx modify spectrum default clear overwrite_colour; gfx modify spectrum default linear reverse range -1 1 extend_above extend_below rainbow colour_range 0 1 ambient diffuse component 1; #Show a whole bunch of graphics. gfx create material jade ambient 0.1 0.56 0 diffuse 0.1 0.39 0 emission 0 0 0 specular 0.8 0.8 0.8 alpha 1 shininess 0.8 gfx modify g_element cube general clear circle_discretization 6 default_coordinate deformed_coordinates element_discretization "8*8*8" native_discretization none; gfx modify g_element cube node_points as node_spheres glyph sphere_hires general size "0.2*0.2*0.2" centre 0,0,0 select_on material jade data deformed_coordinates spectrum default selected_material default_selected; gfx modify g_element cube cylinders as cylinders constant_radius 0.02 select_on material default data deformed_coordinates spectrum default selected_material default_selected; gfx modify g_element cube surfaces as surface face xi3_0 select_on material default data deformed_coordinates spectrum default selected_material default_selected render_shaded; gfx modify g_element cube iso_surfaces as iso_surface iso_scalar mag iso_value 1.2 use_elements select_on material default data deformed_coordinates spectrum default selected_material default_selected render_shaded; gfx modify g_element cube streamlines as streamline xi 0.5,0.5,0.5 ellipse vector deformed_coordinates length 1 width 0.05 travel_scalar select_on material default selected_material default_selected; gfx modify g_element cube element_points as element_point glyph point general size "1*1*1" centre 0,0,0 use_elements cell_centres discretization "3*3*3" native_discretization NONE select_on material default data deformed_coordinates spectrum default selected_material default_selected; if ($TESTING) { #Test the rendering of the scene at various times interpolating the original values. gfx timekeeper default set 1.2; gfx export vrml file deformed_1_2.wrl gfx timekeeper default set 2.8; gfx export vrml file deformed_2_8.wrl } else { #Hide most of the graphics objects so that it runs fast even on a slow computer gfx modify g_element cube node_points as node_spheres glyph sphere_hires general size "0.2*0.2*0.2" centre 0,0,0 select_on material jade data deformed_coordinates spectrum default selected_material default_selected invisible; gfx modify g_element cube cylinders as cylinders constant_radius 0.02 select_on material default data deformed_coordinates spectrum default selected_material default_selected invisible; gfx modify g_element cube surfaces as surface face xi3_0 select_on material default data deformed_coordinates spectrum default selected_material default_selected render_shaded invisible; gfx modify g_element cube streamlines as streamline xi 0.5,0.5,0.5 ellipse vector deformed_coordinates length 1 width 0.05 travel_scalar select_on material default selected_material default_selected invisible; gfx modify g_element cube element_points as element_point glyph point general size "1*1*1" centre 0,0,0 use_elements cell_centres discretization "3*3*3" native_discretization NONE select_on material default data deformed_coordinates spectrum default selected_material default_selected invisible; #Display the scene gfx create win 1; #Set up and start the time keeper gfx timekeeper default swing; gfx timekeeper default play; gfx create time_editor; #Show the scene editor. Now while it is playing you can adjust the rendition #of the cube and change the visibility of the various graphics. gfx edit scene; }
Name Modified Size
time.com 17-Mar-2014 4.2k COPYRIGHT 17-Mar-2014 504 deformed_cube.exelem 17-Mar-2014 3.4k deformed_cube.exnode 17-Mar-2014 683 deformed_cube2.exnode 17-Mar-2014 683 deformed_cube3.exnode 17-Mar-2014 683 undeformed_cube.exelem 17-Mar-2014 3.4k undeformed_cube.exnode 17-Mar-2014 685
Name Modified Size
examples_a_time.tar.gz 09-Mar-2016 26k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:06:04 2016 | 0 |
last break | Mon Aug 25 13:12:00 2014 | 1 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:06:05 2016 | 1 |
last break | Mon Aug 25 13:13:00 2014 | 2 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:06:06 2016 | 1 |
last break | Mon Aug 25 13:13:00 2014 | 2 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:36:34 2016 | 24 |
last break | Tue Feb 24 00:07:00 2015 | 21 | |
x86_64-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:01:34 2016 | 0 |
last break | Fri Aug 15 00:53:00 2014 | 0 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:01:34 2016 | 0 |
last break | Fri Aug 15 00:53:00 2014 | 0 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:01:35 2016 | 1 |
last break | Fri Aug 15 00:53:00 2014 | 1 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:04:07 2016 | 18 |
last break | Sun Mar 6 00:03:00 2016 | 18 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:04:55 2016 | 17 |
i686-linux | |||
Failure | cmgui-wx: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-memorycheck: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-valgrind: | diff test: differences with generic answer; Test output. | |
x86_64-linux | |||
Failure | cmgui-wx: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-memorycheck: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-valgrind: | diff test: differences with generic answer; Test output. |
Html last generated: Wed Mar 9 16:02:53 2016
Input last modified: Wed Mar 9 15:49:33 2016