Example 265: Xi calculations in a host mesh

This example calculates the xi locations inside a host mesh of data points which have been scaled in the x and y components by a factor of 2.2

Results can be viewed with the cmgui comfile draw.com. The purple lines represent the host mesh and the green lines the fitted mesh. The purple spheres correspond to the original data points, the green fitted positions the data points scaled in x and y by 2.2 and the red points the reconstructed xi positions


The comfile run by this example is as follows:

# Calculating Analytic xi positions in a square
#
#


fem def coor 3,1
fem def base;r;trilinear;example
fem def node;r;square;example
fem def elem;r;square;example

#
# Export the geometry of the original host mesh
#
fem export node;orig as orig
fem export elem;orig as orig


fem def data;r;orig_data;example
fem def xi;c contain
fem def xi;w;orig_data
fem export data;orig_data as orig_data offset 300


fem def data;r;scale2-2;example
fem def xi;r;orig_data

fem def field;r;square;example
fem def elem;r;square;example field
fem def fit;r;square;example geom

fem list data error
fem fit

Additional testing commands:


fem write matr;gk  mat gk  using fit
fem write matr;gkk mat gkk using fit
fem write matr;grr mat grr using fit



fem update nodes
fem li node

fem list data error


#
# Export the new geometry
#
fem export node;cust as cust offset 400
fem export elem;cust as cust offset_elem 400
fem export data;new_data as new_data offset 500

#
# Reconstruct the positions from the xi posistions 
#  - For testing
#
fem def data;c from_xi
fem export data;exp_data as exp_data offset 1000

Files used by this example are:

Name              Modified     Size

example_265.com 10-Apr-2000 592 cust.exelem 10-Apr-2000 5.7k cust.exnode 10-Apr-2000 5.4k draw.com 01-Mar-2005 721 exp_data.exdata 10-Apr-2000 503 fitted.ipxi 10-Apr-2000 430 new_data.exdata 10-Apr-2000 503 orig_data.ipdata 10-Apr-2000 417 orig_data.ipxi 10-Apr-2000 430 output_cm.txt 10-Apr-2000 2.2k scale2-2.ipdata 10-Apr-2000 215 square.ipelem 10-Apr-2000 405 square.ipelfd 10-Apr-2000 346 square.ipfiel 10-Apr-2000 6.6k square.ipfit 13-Apr-2007 2.2k square.ipnode 10-Apr-2000 6.2k test_output.com 10-Apr-2000 476 trilinear.ipbase 10-Apr-2000 2.4k

Download the entire example:

Name                      Modified     Size

examples_2_26_265.tar.gz 27-Aug-2010 9.2k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:01:42 20161
cm-debugSuccessSat Mar 5 00:01:59 20161
mips-irix
cmSuccessSun Aug 19 01:26:44 20074
cm-debugSuccessWed Aug 15 01:23:05 20076
cm-debug-clear-mallocSuccessSat Aug 18 01:25:42 20079
cm-debug-clear-malloc7SuccessMon Aug 20 01:22:18 20079
cm64SuccessSun Aug 19 01:26:45 20073
cm64-debugSuccessTue Aug 21 01:21:18 20076
cm64-debug-clear-mallocSuccessThu Apr 1 10:12:22 20042
rs6000-aix
cmSuccessWed Mar 4 01:06:55 20091
cm-debugSuccessMon Mar 2 01:06:06 20091
cm64SuccessWed Mar 4 01:06:55 20091
cm64-debugSuccessTue Mar 3 01:11:38 20091
x86_64-linux
cmSuccessSun Mar 6 00:01:01 20160
cm-debugSuccessSat Mar 5 00:01:12 20160

Testing status by file:


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

Input last modified: Thu Aug 26 13:20:36 2010


CMISS Help / Examples / 2 / 26 / 265