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 20-Apr-2012 4.2k COPYRIGHT 19-Apr-2012 504 deformed_cube.exelem 20-Apr-2012 3.4k deformed_cube.exnode 20-Apr-2012 683 deformed_cube2.exnode 20-Apr-2012 683 deformed_cube3.exnode 20-Apr-2012 683 undeformed_cube.exelem 20-Apr-2012 3.4k undeformed_cube.exnode 20-Apr-2012 685
Name Modified Size
examples_a_backup_time.tar.gz 12-Aug-2014 27k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Success | Sun Mar 6 00:06:51 2016 | 0 |
cmgui-wx-debug | Success | Sun Mar 6 00:06:52 2016 | 1 |
cmgui-wx-debug-memorycheck | Success | Sun Mar 6 00:06:53 2016 | 1 |
cmgui-wx-debug-valgrind | Success | Sun Mar 6 00:37:23 2016 | 21 |
x86_64-linux | |||
cmgui-wx | Success | Thu Jan 7 00:01:31 2016 | 0 |
cmgui-wx-debug | Success | Thu Jan 7 00:01:31 2016 | 0 |
cmgui-wx-debug-memorycheck | Success | Thu Jan 7 00:01:31 2016 | 0 |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:04:04 2016 | 18 |
last break | Sun Mar 6 00:03:00 2016 | 18 | |
last success | Wed Jun 3 00:17:00 2015 | 17 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:04:59 2016 | 17 |
i686-linux | |||
Success | cmgui-wx: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug-memorycheck: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug-valgrind: | diff test: no differences with generic answer. | |
x86_64-linux | |||
Success | cmgui-wx: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug-memorycheck: | diff test: no differences with generic answer. | |
Failure | cmgui-wx-debug-valgrind: | diff test: differences with generic answer; Test output. |
Html last generated: Sun Mar 6 05:51:03 2016
Input last modified: Fri Apr 20 16:02:43 2012