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

Screenshot of example a_backup/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 transformedbase.ipbase ipnode transformed_segment.ipnode ipelem transformed_segment.ipelem region segment

Files used by this example are:

Name                       Modified     Size

transform_coordinates.com 20-Apr-2012 1.3k COPYRIGHT 19-Apr-2012 504 segment.exelem 20-Apr-2012 3.6k segment.exnode 20-Apr-2012 1.0k

Download the entire example:

Name                                            Modified     Size

examples_a_backup_transform_coordinates.tar.gz 12-Aug-2014 9.2k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessSun Mar 6 00:06:53 20161
cmgui-wx-debugSuccessSun Mar 6 00:06:53 20160
cmgui-wx-debug-memorycheckSuccessSun Mar 6 00:06:53 20160
cmgui-wx-debug-valgrindSuccessSun Mar 6 00:27:47 201613
x86_64-linux
cmgui-wxSuccessThu Jan 7 00:01:31 20160
cmgui-wx-debugSuccessThu Jan 7 00:01:31 20160
cmgui-wx-debug-memorycheckSuccessThu Jan 7 00:01:31 20160
cmgui-wx-debug-valgrindSuccessThu Jan 7 00:03:55 201611
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:02:44 20168

Testing status by file:


Html last generated: Sun Mar 6 05:51:03 2016

Input last modified: Fri Apr 20 16:02:47 2012


CMISS Help / Examples / a_backup / transform_coordinates