Example i22:
Magnetic Analytic Test Problem - Inverse Problem
Computes the orientation and location of a single dipole within a
sphere given magnetic field recordings at a single time point at 6
"electrode" locations. The dipole from which the original magnetic
field were created was located at (0,0,1) and had an orientation of
(1,0,0).
The comfile run by this example is as follows:
#Example i22
$OUT='.'
if(!defined $example)
{
$example='.'
}
$resolution = '2x4'
$resolution = '8x16'
$resolution = '4x8'
$interpolation = 'cubic'
$interpolation = 'linear'
fem define para;r;$example/torsotimedep
fem define coor 3,1
fem define base;r;$example/bi$interpolation
fem define node;r;$example/sphere_$resolution reg 1
fem define elem;r;$example/sphere_$resolution reg 1
#
# Export geometry
#
fem export node;$OUT/sphere as sphere
fem export elem;$OUT/sphere as sphere
#
# Setup problem
#
fem define equa;r;$example/laplace_$interpolation reg 1 class 1 lock
fem define mate;r;$example/laplace reg 1 class 1
#
# Solve and export potential due to a dipole
#
fem define sour;r;$example/dipole_true reg 1 class 1
fem de anal;r;$example/eccentricdipole reg 1 class 1
fem de init;g reg 1 class 1
fem define solv;r;$example/nosalu_$interpolation reg 1 class 1
fem solve reg 1 class 1
fem export node;$OUT/sphere_pot as sphere field
fem export elem;$OUT/sphere_pot as sphere field
#
# Evaluate input/recorded magnetic field
#
fem def data;r;$example/elec field num_field 3
fem eval solu mag from MFI nss 1
fem li matr matric MFI nss 1 value
fem up data field from MFI nss 1
fem export data;$OUT/input as input field_num 1..3 field_name mag
#
# Adjusted dipole
#
fem define sour;r;$example/dipole_guess reg 1 class 1
fem up source
fem de anal;r;$example/eccentricdipole reg 1 class 1
fem de init;g reg 1 class 1
fem define solv;r;$example/nosalu_$interpolation reg 1 class 1
fem solve reg 1 class 1
Additional testing commands:
#Testing example i22
#
# Evaluate adjusted/guess magnetic field
#
fem eval solu mag from MFI nss 2
fem li matr matric MFI nss 2 value
fem up data field from MFI nss 2
fem export data;$OUT/optim as optim field_num 1..3 field_name mag
#
# Optimise
#
fem def opti;r;$example/optimise
fem eval resid wrt magnetic list 1
fem li sour
optimise
fem eval resid wrt magnetic list 1
fem def sour;w;dipole_optim
Files used by this example are:
Name Modified Size
example_i22.com 20-May-2002 1.5k
bicubic.ipbase 20-May-2002 6.8k
bilinear.ipbase 20-May-2002 5.7k
dipole_guess.ipsour 20-May-2002 307
dipole_true.ipsour 20-May-2002 293
eccentricdipole.ipanal 20-May-2002 720
elec.ipdata 20-May-2002 438
laplace.ipmate 20-May-2002 54
laplace_cubic.ipequa 26-May-2003 1.3k
laplace_linear.ipequa 26-May-2003 1.3k
nosalu_cubic.ipsolv 13-Apr-2007 1.3k
nosalu_linear.ipsolv 13-Apr-2007 1.2k
optimise.ipopti 03-Aug-2002 1.5k
sphere_2x4.ipelem 20-May-2002 3.1k
sphere_2x4.ipnode 20-May-2002 5.7k
sphere_4x8.ipelem 20-May-2002 11k
sphere_4x8.ipnode 20-May-2002 23k
sphere_8x16.ipelem 20-May-2002 43k
sphere_8x16.ipnode 20-May-2002 100k
test_output.com 14-Aug-2002 402
torsotimedep.ippara 12-Nov-2002 5.9k
Download the entire example:
Name Modified Size
examples_i_i2_i22.tar.gz 19-Jan-2011 20k
Testing status by version:
Testing status by file:
- cmiss_test.log
- cmiss_test.out
i686-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
linux_debug answer.
|
mips-irix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
rs6000-aix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
x86_64-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
- dipole_optim.ipsour
i686-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
linux_debug answer.
|
mips-irix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug-clear-malloc: | ndiff test: no significant differences with
generic answer.
|
rs6000-aix | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Success | cm64: | ndiff test: no significant differences with
generic answer.
|
Success | cm64-debug: | ndiff test: no significant differences with
generic answer.
|
x86_64-linux | | | |
Success | cm: | ndiff test: no significant differences with
generic answer.
|
Success | cm-debug: | ndiff test: no significant differences with
generic answer.
|
Html last generated: Sun Mar 6 05:51:38 2016
Input last modified: Tue Jan 18 11:10:04 2011
CMISS Help /
Examples /
i /
i2 /
i22