fem update gauss stress; fem export gauss;FILE yg as LABEL
#cmgui script to view a stress field gfx define tessellation default minimum_divisions "1" refinement_factors "10"; gfx create material bluey ambient 0 0.25 0.5 diffuse 0 0.4 1 specular 0.5 0.5 0.5 shininess 0.3 gfx create material gold ambient 1 0.4 0 diffuse 1 0.7 0 specular 0.5 0.5 0.5 shininess 0.8 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 create material blue ambient 0 0 0 diffuse 0 0.2 1 emission 0 0 0 specular 0.5 0.5 0.5 alpha 1 shininess 0.3 gfx create material green ambient 0 1 0 diffuse 0 1 0 emission 0 0 0 specular 0 0 0 alpha 1 shininess 0 gfx create material red ambient 1 0 0 diffuse 1 0 0 emission 0 0 0 specular 0 0 0 alpha 1 shininess 0 gfx create spectrum stress; sub setupgroup { my $region = shift; my $material = shift; my $vis = shift; my $coord = shift #my $glyph = shift; gfx modify g_element $region general clear; gfx modify g_element $region lines coordinate $coord select_on material default selected_material default_selected; #gfx modify g_element $region element_points coordinate $coord glyph point general size "1*1*1" centre 0,0,0 label cmiss_number use_elements cell_centres discretization "1*1*1" native_discretization NONE select_on material default selected_material default_selected; gfx modify g_element $region element_points coordinate $coord glyph point general size "1*1*1" centre 0,0,0 use_elements cell_centres discretization "1*1*1" native_discretization NONE select_on material default selected_material default_selected; #gfx modify g_element $region cylinders coordinate $coord circle_discretization 6 constant_radius 0.3 select_on material default selected_material default_selected; gfx modify g_element $region node_points coordinate $coord glyph point label cmiss_number general size "1*1*1" centre 0,0,0 select_on material $material selected_material default_selected; #gfx modify g_element $region data_points coordinate $coord glyph sphere general size "1*1*1" centre 0,0,0 select_on material $material selected_material default_selected; gfx modify g_element $region surfaces coordinate $coord select_on material $material selected_material default_selected render_wireframe; #gfx set vis $group $vis; } # deformed mesh $filename = "deformed"; $region = "deformed"; gfx read node $example/$filename.exnode; gfx read elem $example/$filename.exelem; setupgroup( $region , "green", "on", "deformed"); gfx read data $example/$filename.exdata; # To view the data points, need an 'embedded' field returning the deformed field # from the host mesh evaluated at the element_xi location read in from the data points: gfx define field deformed/element_xi_coordinate embedded element_xi element_xi field deformed; # The stress tensor is a symmetric matrix of the following six components # 1 4 5 # 4 2 6 # 5 6 3 #If the fields were named by just a number then the composite field #would interpret these as constant numbers so we could use a scale #field to give them a better name. cm used to name the fields using #numbers but this has now been corrected and it prepends 'yg' to the #field names. Leaving this here but commented out for reference. #gfx define field deformed/V composite 1 4 5 4 2 6 5 6 3 # doesn't work # gfx define field deformed/stress11 scale field 1 scale_factor 1.0; # gfx define field deformed/stress22 scale field 2 scale_factor 1.0; # gfx define field deformed/stress33 scale field 3 scale_factor 1.0; # gfx define field deformed/stress12 scale field 4 scale_factor 1.0; # gfx define field deformed/stress13 scale field 5 scale_factor 1.0; # gfx define field deformed/stress23 scale field 6 scale_factor 1.0; # gfx define field deformed/T composite stress11 stress12 stress13 stress12 stress22 stress23 stress13 stress23 stress33; gfx define field deformed/T composite yg1 yg4 yg5 yg4 yg2 yg6 yg5 yg6 yg3 gfx define field deformed/principal_stress eigenvalues field T gfx define field deformed/principal_stress_vectors coordinate_system rectangular_cartesian eigenvectors eigenvalues principal_stress gfx define field deformed/principal_stress1 composite principal_stress.1 gfx define field deformed/principal_stress2 composite principal_stress.2 gfx define field deformed/principal_stress3 composite principal_stress.3 gfx define field deformed/principal_stress_vector1 coordinate_system rectangular_cartesian composite principal_stress_vectors.1 principal_stress_vectors.2 principal_stress_vectors.3 gfx define field deformed/principal_stress_vector2 coordinate_system rectangular_cartesian composite principal_stress_vectors.4 principal_stress_vectors.5 principal_stress_vectors.6 gfx define field deformed/principal_stress_vector3 coordinate_system rectangular_cartesian composite principal_stress_vectors.7 principal_stress_vectors.8 principal_stress_vectors.9 # normalise principal stress vectors gfx define field deformed/norm_def_principal_stress_vector1 coordinate_system rectangular_cartesian normalise field principal_stress_vector1 gfx define field deformed/norm_def_principal_stress_vector2 coordinate_system rectangular_cartesian normalise field principal_stress_vector2 gfx define field deformed/norm_def_principal_stress_vector3 coordinate_system rectangular_cartesian normalise field principal_stress_vector3 $gsize="0*0.05*0.05"; $sf="0.05*0*0"; gfx modify g_element $region data_points coordinate element_xi_coordinate glyph mirror_cone size $gsize centre 0,0,0 orientation principal_stress_vector1 variable_scale principal_stress1 scale_factors $sf select_on material bluey data principal_stress1 spectrum stress selected_material default_selected gfx modify g_element $region data_points coordinate element_xi_coordinate glyph mirror_cone size $gsize centre 0,0,0 orientation principal_stress_vector2 variable_scale principal_stress2 scale_factors $sf select_on material bluey data principal_stress2 spectrum stress selected_material default_selected gfx modify g_element $region data_points coordinate element_xi_coordinate glyph mirror_cone size $gsize centre 0,0,0 orientation principal_stress_vector3 variable_scale principal_stress3 scale_factors $sf select_on material bluey data principal_stress3 spectrum stress selected_material default_selected if (! $TESTING) { gfx create window; gfx edit scene; gfx modify window 1 layout width 800 height 700; gfx modify g_element "/" point as axes glyph axes size "0.5*0.5*0.5" centre 0.1,0.1,0.1 material default; gfx modify spectrum stress autorange; }
Name Modified Size
view_stress.com 17-Mar-2014 6.4k COPYRIGHT 17-Mar-2014 504 deformed.exdata 17-Mar-2014 20k deformed.exelem 17-Mar-2014 11k deformed.exnode 17-Mar-2014 10k
Name Modified Size
examples_a_view_stress.tar.gz 09-Mar-2016 80k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:06:08 2016 | 0 |
last break | Mon Aug 25 13:13:00 2014 | 1 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:06:09 2016 | 1 |
last break | Mon Aug 25 13:13:00 2014 | 1 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:06:09 2016 | 1 |
last break | Mon Aug 25 13:13:00 2014 | 1 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:34:39 2016 | 21 |
last break | Tue Feb 24 00:06:00 2015 | 22 | |
x86_64-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Fri Aug 15 00:54:00 2014 | 0 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Fri Aug 15 00:54:00 2014 | 0 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Fri Aug 15 00:54:00 2014 | 1 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:04:02 2016 | 15 |
last break | Sun Mar 6 00:03:00 2016 | 15 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:04:30 2016 | 14 |
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:56 2016
Input last modified: Wed Mar 9 15:49:45 2016