Example a/transform_coordinates: Transforming nodal coordinates from spherical polar to rectangular cartesian

Screenshot of example a/transform_coordinates

The comfile run by this example is as follows:

# transform the nodal coordinate system from a sphercial polar system
# to a rectangular cartesian system

# read in nodes with the existing coordinate system called coordinates
# (the spherical polar coordinate system)
gfx read nodes $example/segment.exnode;
gfx read elements $example/segment.exelem;

# create a new coordinate system (the rectangular cartesian system)
gfx define field rect coordinate_system rectangular_cartesian coordinate_transformation field coordinates;

# create a field to store the new coordinate values for the nodes
gfx define field rect_coords finite_element number_of_components 3 real coordinate;
gfx modify nodes group segment define rect_coords;

# note there is currently no way to define a new field on an element,
# so this method is only useful for exporting nodes, not elements
# calculate the new coordinate values
gfx evaluate source rect dest rect_coords ngroup segment

# write out an exnode file with the new coordinate system
gfx write nodes transformed_segment.exnode field rect_coords group segment

# export an ipnode file (unfortunately we have to specify all the other
# file names even though we are not interested in them).
gfx export cm field rect_coords ipcoor transformed_segment.ipcoor ipbase transformed_segment.ipbase ipnode transformed_segment.ipnode ipelem transformed_segment.ipelem region segment

Files used by this example are:

Name                       Modified     Size

transform_coordinates.com 09-Mar-2016 1.3k COPYRIGHT 17-Mar-2014 504 segment.exelem 17-Mar-2014 3.6k segment.exnode 17-Mar-2014 1.0k

Download the entire example:

Name                                     Modified     Size

examples_a_transform_coordinates.tar.gz 09-Mar-2016 10k

Testing status by version:

StatusTestedReal time (s)
cmgui-wxFailureSun Mar 6 00:06:06 20161
last breakMon Aug 25 13:13:00 20141
cmgui-wx-debugFailureSun Mar 6 00:06:06 20160
last breakMon Aug 25 13:13:00 20141
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:06:06 20160
last breakMon Aug 25 13:13:00 20141
cmgui-wx-debug-valgrindFailureSun Mar 6 00:26:59 201614
last breakTue Feb 24 00:03:00 201513
cmgui-wxFailureSun Mar 6 00:01:34 20160
last breakFri Aug 15 00:53:00 20140
cmgui-wx-debugFailureSun Mar 6 00:01:35 20160
last breakFri Aug 15 00:53:00 20140
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:35 20161
last breakFri Aug 15 00:53:00 20140
cmgui-wx-debug-valgrindFailureSun Mar 6 00:03:31 201610
last breakFri Aug 15 00:53:00 201410
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:02:42 20169

Testing status by file:

Html last generated: Wed Mar 9 16:02:54 2016

Input last modified: Wed Mar 9 15:49:44 2016

CMISS Help / Examples / a / transform_coordinates