Example a_backup/at: Nodal derivative editing: bicubic Hermite-linear mesh

Uses "node_value" computed fields to extract nodal derivatives as vector fields. These are used to orient glyphs at nodes and thus show the direction and magnitude of the derivative vectors. The node points are drawn with "select_on", allowing them to be selected with the mouse. When selected, the vectors for controlling derivatives will appear and be editable, since they are in mode "draw_selected".

Screenshot of example a_backup/at


The comfile run by this example is as follows:

#Example_at: Nodal derivative editing: bicubic Hermite-linear mesh
#
# Uses "node_value" computed fields to extract nodal derivatives as vector
# fields. These are used to orient glyphs at nodes and thus show the direction
# and magnitude of the derivative vectors. The node points are drawn with
# "select_on", allowing them to be selected with the mouse. When selected, the
# vectors for controlling derivatives will appear and be editable, since they
# are in mode "draw_selected".
#
# Run all the commands in order, then choose the node_tool on the graphics
# window to allow node position and derivative editing. Use shift-clicking to
# multi-select nodes to re-position. Control-drag the mouse at any time
# to rotate, translate and zoom the scene.
# Later make cross derivative vectors and surfaces visible for more interesting
# derivative control.
#
#----------
#
gfx cre mat copper ambient 1 0.2 0 diffuse 0.6 0.3 0 specular 0.7 0.7 0.5 shininess 0.3
gfx cre mat gold ambient 1 0.4 0 diffuse 1 0.7 0 specular 0.5 0.5 0.5 shininess 0.8
gfx create material silver ambient 0.4 0.4 0.4 diffuse 0.7 0.7 0.7 emission 0 0 0 specular 0.7 0.7 0.7 alpha 1 shininess 0.6
gfx create material skin ambient 1 0.2 0 diffuse 0.8 0.7 0.45 emission 0 0 0 specular 0.4 0.2 0.2 alpha 1 shininess 0.2
gfx create material black_skin ambient 0.4 0.1 0.1 diffuse 0.4 0.2 0.1 emission 0 0 0 specular 0.5 0.5 0.5 alpha 1 shininess 0.2
gfx create material red ambient 1 0 0 diffuse 1 0 0
gfx create material green ambient 0 1 0 diffuse 0 1 0
gfx read node example bicubic_linear.exnode
gfx read elem example bicubic_linear.exelem
# Extract the nodal derivatives as vector fields:
gfx define field dx_ds1 node_value fe_field coordinates d/ds1
gfx define field dx_ds2 node_value fe_field coordinates d/ds2
# Extract the cross derivative:
gfx define field d2x_ds1ds2 node_value fe_field coordinates d2/ds1ds2
gfx define tessellation default minimum_divisions "1" refinement_factors "10*10*1";
gfx modify g_element bicubic_linear general clear;
gfx modify g_element bicubic_linear lines coordinate coordinates material default;
gfx create window 1;
gfx modify window 1 view parallel eye_point 4.6077 -4.39539 3.79437 interest_point 1 1 1 up_vector -0.228712 0.322744 0.918437 view_angle 40;

# Turn on spheres at the nodes:
gfx modify g_element bicubic_linear node_points coordinate coordinates glyph sphere size 0.12 mat skin select_on
# Turn on gold arrows in the d/ds1 direction:
gfx modify g_element bicubic_linear node_points coordinate coordinates glyph arrow_solid size "0*0.1*0.1" scale_factors "0.5*0*0" orientation dx_ds1 mat gold selected_mat gold draw_selected

# Turn on silver arrows in the d/ds2 direction:
gfx modify g_element bicubic_linear node_points coordinate coordinates glyph arrow_solid size "0*0.1*0.1" scale_factors "0.5*0*0" orientation dx_ds2 mat silver selected_mat silver draw_selected

#
# Add cross derivative arrows.
gfx modify g_element bicubic_linear node_points glyph arrow_solid size "0*0.1*0.1" scale_factors "0.1*0*0" orientation d2x_ds1ds2 mat red draw_selected draw_selected

# Add invisible surfaces.
gfx modify g_element bicubic_linear surfaces coordinate coordinates exterior render_wireframe material copper;
#
# Enable editing with the node_tool on the graphics window.
# Note: Normally just click on the node_tool button in the graphics
# window to set these and other options.
gfx modify window 1 set node_tool;
gfx modify window 1 node_tool edit;
#
# As an extra exercise, turn off the node d/ds1 and d/ds2 derivatives,
# and switch the surfaces on in the graphical element editor.
# The cross derivatives are all zero to start with, so you cannot see their glyph.
# Use the Node viewer (under the Model menu) to set a non-zero value for a node.
# The glyph will become visible and adjustable. 


Files used by this example are:

Name                   Modified     Size

example_at.com 20-Apr-2012 3.7k COPYRIGHT 19-Apr-2012 504 bicubic_linear.exelem 20-Apr-2012 7.7k bicubic_linear.exnode 20-Apr-2012 1.1k

Download the entire example:

Name                         Modified     Size

examples_a_backup_at.tar.gz 12-Aug-2014 33k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessSun Mar 6 00:10:33 20163
cmgui-wx-debugSuccessSun Mar 6 00:11:44 20162
cmgui-wx-debug-memorycheckSuccessSun Mar 6 00:11:27 20162
cmgui-wx-debug-valgrindFailureSun Mar 6 00:54:29 201633
last breakSun Mar 6 00:53:00 201633
last successTue Feb 10 00:47:00 201539
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:36 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:05:00 20150
cmgui-wx-debugFailureSun Mar 6 00:01:36 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:05:00 20151
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:36 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:05:00 20151
cmgui-wx-debug-valgrindFailureSun Mar 6 00:03:05 20169
last breakSun Mar 6 00:02:00 20169
last successWed Jun 3 00:25:00 201528
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:02:21 20167

Testing status by file:


Html last generated: Sun Mar 6 05:50:53 2016

Input last modified: Fri Apr 20 15:56:43 2012


CMISS Help / Examples / a_backup / at