Example e33: Fitting an Activation Sequence to BEM mesh

This example creates an activation sequence for use in a forward problem. The original activation sequence was created using a single region, tricubic Hermite FEM mesh and solved for an Eikonal equation (refer PhD Thesis - K Tomlinson). This activation sequence has been transformed, orthoganally projected onto a 3 region BEM bi-linear mesh and fitted. This provides a smooth activation sequence on a mesh with different geometric shape and properties.

The activation map can be visualised with draw.com.
The data projections can be visualised with draw_projections.com.

Fitted Activation Field Orthogonal Projections of Data Points


The comfile run by this example is as follows:

# Example e33
# -----------
#


# Inputs
#

# Command updated by fixcom.sh on Wed Aug 23 17:50:24 NZT 2000
# Old command: assign variable INPUT refinedheart
$INPUT = "refinedheart"


# Command updated by fixcom.sh on Wed Aug 23 17:50:24 NZT 2000
# Old command: assign variable FITREG 3
$FITREG = 3



# Grouping specific nodes
#

# Command updated by fixcom.sh on Wed Aug 23 17:50:24 NZT 2000
# Old command: assign variable EPIDATA    1..13,38..55,85..93:2,90..108:2,105,107,109,111,113..123
$EPIDATA = "1..13,38..55,85..93:2,90..108:2,105,107,109,111,113..123"


# Command updated by fixcom.sh on Wed Aug 23 17:50:24 NZT 2000
# Old command: assign variable LVENDODATA 25..36,37,56..73,124..153 
$LVENDODATA = "25..36,37,56..73,124..153"


# Command updated by fixcom.sh on Wed Aug 23 17:50:24 NZT 2000
# Old command: assign variable RVENDODATA 14,15,16..24,74..84,86,88,95..103,110,112,154..159
$RVENDODATA = "14,15,16..24,74..84,86,88,95..103,110,112,154..159"



fem def para;r;fitting;example
fem def regi;r;three;example
fem def coor 3,1
fem def base;r;bilinear;example
fem def node;r;$INPUT;example reg all
fem def elem;r;$INPUT;example reg all
fem list regi;regions reg all


#
#----------------------------#
# Export geometry
#----------------------------#
#
fem export node;pigheart as heart reg all
fem export elem;epi as epi reg 3
fem export elem;rvendo as rvendo reg 2
fem export elem;lvendo as lvendo reg 1


#
#----------------------------#
# Projections of all data onto 
#  all 3 surfaces
#----------------------------#
#
#fem def data;r;tricub_heart
#fem def xi;c closest reg 3
#fem export data;tricub_heart as tricub_heart error offset 10000
#fem export data;epi_data as epi_data error number EPIDATA offset 20000


#
#----------------------------#
# Projections of epi data onto 
#  all 3 surfaces
#----------------------------#
#
#fem def data;r;epi
#fem def xi;c closest reg 3
#fem def xi;w;epi reg 3
#fem def data;c from_xi
#fem export data;epi_xi as epi_xi offset 30000


#fem export data;lvendo_data as lvendo_data error number LVENDODATA offset 40000
#fem export data;rvendo_data as rvendo_data error number RVENDODATA offset 50000


#
#----------------------------#
# Projections of lvendo data 
#  onto the lvendo surface
#----------------------------#
#
#fem def data;r;lvendo
#fem def xi;c closest reg 1
#fem def xi;w;lvendo reg 1
#fem export data;lvendo_data as lvendo_data error offset 60000


#fem def data;c from_xi 
#fem export data;lvendo_xi as lvendo_xi offset 70000


#
#----------------------------#
# Projections of rvendo data 
#  onto the rvendo surface
#----------------------------#
#
#fem def data;r;rvendo
#fem def xi;c closest reg 2
#fem def xi;w;rvendo reg 2
#fem export data;rvendo_data as rvendo_data error offset 80000


#fem def data;c from_xi 
#fem export data;rvendo_xi as rvendo_xi offset 90000


#
#----------------------------#
# Define fields to fit to
#----------------------------#
#
fem def field;r;refined_heart ;example reg $FITREG
fem def elem;r;refined_heart;example field reg $FITREG
#fem def field;w;refined_heart reg FITREG
#fem def elem;w;refined_heart field  reg FITREG


#
#----------------------------#
# Final set of data with 
#  activations and xi locations
#----------------------------#
#
fem def data;r;full_activ;example field reg $FITREG
#fem def xi;c close reg 3
#fem def xi;w;bob reg 3


fem def xi;r;full;example reg $FITREG
fem export data;full as full error reg $FITREG offset 100000


Additional testing commands:

fem list data error reg $FITREG
fem def fit;r;refined_heart;example field  reg $FITREG
fem fit reg $FITREG
fem list node node 1 reg $FITREG


fem export node;fitted as fitted reg all offset 20000
fem export elem;fitted_vendos as fitted_vendos reg 3 offset_ele 20000 elem 2433..3584
fem export elem;fitted_epi    as fitted_epi    reg 3 offset_ele 20000 elem 1153..2432


fem up data datafield from_field 1 to_field 2 reg $FITREG
fem def data;w;bob field reg $FITREG
fem comp data mast 1 comp 2 reg $FITREG


Files used by this example are:

Name                             Modified     Size

example_e33.com 20-Nov-2001 3.4k activation.ipinit 10-Apr-2000 31k activation.txt 10-Apr-2000 4.7k activation_less.txt 10-Apr-2000 2.7k bilinear.ipbase 10-Apr-2000 3.4k bob.ipdata 10-Apr-2000 15k epi.ipdata 10-Apr-2000 3.8k fitting.ippara 12-Nov-2002 5.9k full.ipdata 10-Apr-2000 9.0k full.ipxi 10-Apr-2000 8.7k full_activ.ipdata 10-Apr-2000 12k full_activ_fixed.ipdata 10-Apr-2000 12k full_fixed_contains_reg123.ipxi 10-Apr-2000 8.6k full_fixed_contains_reg3.ipxi 10-Apr-2000 8.7k lvendo.ipdata 10-Apr-2000 3.8k r011-lessin.5.ipinit 10-Apr-2000 245k refined_heart.ipelfd 10-Apr-2000 504k refined_heart.ipfiel 10-Apr-2000 345k refined_heart.ipfit 13-Apr-2007 1.6k refinedheart.irelem 10-Apr-2000 1.1M refinedheart.irnode 10-Apr-2000 3.0M rvendo.ipdata 10-Apr-2000 2.3k test_output.com 20-Nov-2001 506 three.ipregi 10-Apr-2000 94 tricub_heart.ipdata 10-Apr-2000 9.8k tricub_heart.ipxi 10-Apr-2000 9.5k

Download the entire example:

Name                      Modified     Size

examples_e_e3_e33.tar.gz 27-Aug-2010 2.0M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:05:06 20166
cm-debugSuccessSat Mar 5 00:34:13 201623
mips-irix
cmSuccessSun Aug 19 03:34:13 2007132
cm-debugSuccessWed Aug 15 03:36:09 2007306
cm-debug-clear-mallocSuccessSat Aug 18 04:02:51 2007318
cm-debug-clear-malloc7SuccessMon Aug 20 04:01:29 2007331
cm64SuccessSun Aug 19 03:36:40 2007143
cm64-debugSuccessTue Aug 21 02:45:46 2007330
cm64-debug-clear-mallocSuccessThu Apr 1 12:06:15 2004144
rs6000-aix
cmSuccessWed Mar 4 01:14:38 200911
cm-debugSuccessMon Mar 2 01:22:16 200964
cm64SuccessWed Mar 4 01:14:14 200911
cm64-debugSuccessTue Mar 3 01:30:03 200976
x86_64-linux
cmSuccessSun Mar 6 00:01:17 20163
cm-debugSuccessSat Mar 5 00:03:28 201613

Testing status by file:


Graphical output from this problem is given here.


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

Input last modified: Thu Aug 26 14:30:53 2010


CMISS Help / Examples / e / e3 / e33