Example 2142: Stripe line data (calculated) - 8 bilinear 2D elements


The comfile run by this example is as follows:

#Example_2142  Geometry fit of myocardial finite element model to                                                                   
#              SPAMM stripe data which has been obtained using                                                                      
#              the define data;calculate stripe command. Eight                                                                      
#              bilinear 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 coor;r;example_2142_1d;example                                                                                               
fem define base;r;example_2142_1d;example   #1D elements: r and theta are                                                               
#                                        linear in xi                                                                               
fem define node;r;example_2142_1d;example   #default radii and slopes                                                                   
fem define elem;r;example_2142_1d;example                                                                                               
fem define field;r;example_2142_1d;example                                                                                              
fem define window;c on 1                                                                                                            
fem draw li        #display contours before fitting them                                                                            
fem draw node                                                                                                                       
fem draw elem                                                                                                                       
                                                                                                                                    
                                                                                                                                    
#Read in data defining contours                                                                                                     
fem define data;r;example_2142_epi02norm;example geom  #Read in pts lying on                                                            
#                                                   epicardium                                                                      
fem define data;c xi in 9..16                                                                                                       
fem draw data                                                                                                                       
fem draw data proj                                                                                                                  
fem define fit;r;example_2142_1d;example geom in 9..16                                                                                  
fem fit geometry                                                                                                                    
fem update node in 1                                                                                                                
fem draw line                                                                                                                       
fem draw data proj                                                                                                                  
fem can data                                                                                                                        
                                                                                                                                    
#Fit inner element contour to endocardium                                                                                           
fem define data;r;example_2142_endo02norm;example geom  #Read in pts lying on                                                           
#                                                    endocardium                                                                    
fem define data;c xi in 1..8                                                                                                        
fem draw data                                                                                                                       
fem draw data proj                                                                                                                  
fem define fit;r;example_2142_1d;example geom in 1..8                                                                                   
fem fit geometry                                                                                                                    
fem update node in 1                                                                                                                
fem draw line                                                                                                                       
fem draw data proj                                                                                                                  
fem hi data proj                                                                                                                    
fem can data                                                                                                                        
fem can elem                                                                                                                        
fem can data                                                                                                                        
                                                                                                                                    
#Next define the "reference" or undeformed element                                                                                  
#geometry using the above fitted contours                                                                                           
fem define coor;r;example_2142;example                                                                                                  
fem define bas;r;example_2142;example       #one 2D bilinear basis                                                                      
#                                        r and theta both linear in xi1,xi2                                                         
fem define node;r;example_2142_fitted;example                                                                                           
fem define elem;r;example_2142;example         #eight 2D bilinear elements                                                              
#fem define window;c on 1                  !if window not already displayed                                                         
fem draw li                                                                                                                         
fem draw node                                                                                                                       
fem define data;r;example_2142_def300;example geom    #Input stripe data from                                                           
#                                                  reference configuration.                                                         
fem define data;c xi      #Calculate xis for reference config.                                                                      
fem define data;w;example_2142_def300 xi                                                                                        
fem can data                                                                                                                        
fem define data;r;example_2142_undef300;example geom  #Input stripe data from                                                           
#                                                  deformed config.                                                                 
fem define data;r;example_2142_def300 xi      #Input xis from reference                                                         
#                                                  config.                                                                          
fem draw data                                                                                                                       
fem draw data trace                                                                                                                 
fem define field;r;example_2142;example                                                                                                 
fem define fit;r;example_2142;example geom   #weighting of 1.                                                                           
fem fit geom                                                                                                                        
fem update node                                                                                                                     
fem draw li                                                                                                                         
fem draw data trace                                                                                                                 
fem draw node                                                                                                                       
fem quit                                                                                                                            

Files used by this example are:

Name                            Modified     Size

example_2142.com 22-Jun-2000 10k example_2142.ipbase 10-Apr-2000 4.4k example_2142.ipcoor 10-Apr-2000 3.5k example_2142.ipdata 10-Apr-2000 24k example_2142.ipelem 10-Apr-2000 5.3k example_2142.ipfiel 10-Apr-2000 5.4k example_2142.ipfit 10-Apr-2000 3.0k example_2142.ipnode 10-Apr-2000 7.4k example_2142.ipxi 10-Apr-2000 6.4k example_2142_1d.ipbase 10-Apr-2000 818 example_2142_1d.ipcoor 10-Apr-2000 1.1k example_2142_1d.ipelem 10-Apr-2000 10k example_2142_1d.ipfiel 10-Apr-2000 2.8k example_2142_1d.ipfit 10-Apr-2000 1.0k example_2142_1d.ipnode 10-Apr-2000 2.5k example_2142_def300.ipdata 10-Apr-2000 30k example_2142_def300.ipfit 10-Apr-2000 532 example_2142_endo02norm.ipdata 10-Apr-2000 8.8k example_2142_epi02norm.ipdata 10-Apr-2000 16k example_2142_fitted.ipnode 10-Apr-2000 7.4k example_2142_undef300.ipdata 10-Apr-2000 30k example_2142_undef300.ipxi 10-Apr-2000 8.1k

Download the entire example:

Name                           Modified     Size

examples_2_21_214_2142.tar.gz 19-Aug-2006 20k

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

Input last modified: Thu Jun 22 14:53:35 2000


CMISS Help / Examples / 2 / 21 / 214 / 2142