Example 2141: Stripe intersection data - 4 bicubic 2D elements


The comfile run by this example is as follows:

#Example_2141  Geometry fit of myocardial finite element model to
#              SPAMM stripe intersection data.  Four bicubic 2D elements
#              are used. Fit is based on least squares error with smoothing.

#First construct 1D contours to be fitted to endo and epicardium

fem define coordinate;r;example_2141;example
fem define base;r;example_2141;example   #1D elements: r and theta are 
#                                        !  bicubic in xi
fem define node;r;;example               #default radii and slopes
fem define element;r;;example
fem define field;r;;example
fem define element;r;;example field                  
fem define window;c on 1
fem draw line                            #display contours before fitting
#                                        !  them
     
#Define data defining contours
                       
fem define data;r;example_2141_epi02norm;example  #Read in data which lies on
#                                        !  epicardium
fem define data;c xi elements 1..4                         
fem draw data                                        
fem draw data projection                                  
fem define fit;r;example_2141;example geometry elements 1..4   
fem fit geometry                                     
fem update node in 1                                 
fem draw line                                        
fem draw data projection                                   
fem cancel data                                         
fem hide data projection 

fem define data;r;example_2141_endo02norm;example #Read in data which lies on
#                                        !  endocardium
fem define data;c xi elements 5..8                         
fem draw data                                       
fem draw data projection                                   
fem define fit;r;example_2141;example geometry elements 5..8   
fem fit geometry                                     
fem update node in 1                                 
fem draw line                                       
fem draw data projection                                   
fem cancel data                                         
fem hide data projection     
fem cancel element                                         
fem cancel field                                        
fem cancel data               #cancel data to prepare for SPAMM line data

fem define nodes;w;example_2141_fitted       
#                     Next define the "reference" or undeformed
#                     element geometry using the above fitted contours
fem define coordinate;r;example_2141;example            
fem def base;r;example_2141_myo3;example     #two 2D bicubic hermite basis:
#                                        r is bicubic in xi1, xi2 
#                                        theta is bicubic in xi1, xi2 
fem def nodes;r;example_2141_fitted;example  
fem def element;r;example_2141_myo2;example    #four bicubic hermite elements
#fem def window;c on 1                     !if window not already displayed 
fem draw line  rgb=black                   #Display  elements
fem def data;r;example_2141_defxsecn;example  geom   #Input intersections
#                                                 from ref. config.
fem def data;c xi                                #Calculated xis for
#                                                 reference config.
fem def data;w;example_2141_defxsecn xi
fem can data                                    
fem def data;r;example_2141_undefxsecn;example geom  #Input intersections
#                                                 from deformed config.
fem def data;r;example_2141_defxsecn xi      #Input xis from reference
#                                                 intersections

#fem def im;r;example_2141_spamm13;example size 128  !Display SPAMM image (optional)                                            
#fem def im                                          
#fem ch lut start white end black                    
#fem draw line rgb=black                            
fem draw data  rgb=black                             
fem draw data trace                                  
fem def field;r;example_2141_myo2;example                
fem def fit;r;example_2141_weightp01;example  geom   #weighting values of .1
fem fit geom                                    
fem update node
                            
#fem hi im                    !Display SPAMM image (optional
#fem can im                                          
#fem def im;r;example_2141_spamm3;example size 128       
#fem def im                                         
fem draw li rgb=black          #Display fitted geometry
fem draw node                                   
fem draw data trace                                 
fem quit                                            

Files used by this example are:

Name                            Modified     Size

example_2141.com 22-Jun-2000 4.7k example_2141.ipbase 10-Apr-2000 2.3k example_2141.ipcoor 10-Apr-2000 935 example_2141.ipdata 10-Apr-2000 6.8k example_2141.ipelem 10-Apr-2000 2.4k example_2141.ipfiel 10-Apr-2000 1.4k example_2141.ipfit 10-Apr-2000 42 example_2141.ipnode 10-Apr-2000 2.3k example_2141_defxsecn.ipdata 10-Apr-2000 3.6k example_2141_endo02norm.ipdata 10-Apr-2000 8.8k example_2141_epi02norm.ipdata 10-Apr-2000 16k example_2141_fitted.ipfit 10-Apr-2000 2.5k example_2141_fitted.ipnode 10-Apr-2000 5.0k example_2141_myo2.ipelem 10-Apr-2000 3.4k example_2141_myo2.ipfiel 10-Apr-2000 4.2k example_2141_myo2.ipfit 10-Apr-2000 1.9k example_2141_myo3.ipbase 10-Apr-2000 10k example_2141_myo3.ipfiel 10-Apr-2000 7.4k example_2141_undefxsecn.ipdata 10-Apr-2000 3.6k example_2141_weightp01.ipfit 10-Apr-2000 3.0k

Download the entire example:

Name                           Modified     Size

examples_2_21_214_2141.tar.gz 19-Aug-2006 9.1k

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

Input last modified: Thu Jun 22 14:15:15 2000


CMISS Help / Examples / 2 / 21 / 214 / 2141