mv_calc_system_mat

PURPOSE ^

MV_CALC_SYSTEM_MAT: s_mat= mv_calc_system_mat( fwd_model, img)

SYNOPSIS ^

function s_mat= mv_calc_system_mat( fwd_model, img)

DESCRIPTION ^

 MV_CALC_SYSTEM_MAT: s_mat= mv_calc_system_mat( fwd_model, img)
 System Matrix for Marco Vauhkonen's EIDORS2D code
 s_mat.E   = FEM system matrix
 s_mat.Ela = Normalised volumes of the elements
 s_mat.D   = The sgradients of the shape functions over each element.
 s_mat.Vols= Normalised volums of the elements
 s_mat.perm= permutation of system matrix
 fwd_model = forward model
 img       = image background for system matrix calc

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function s_mat= mv_calc_system_mat( fwd_model, img)
0002 % MV_CALC_SYSTEM_MAT: s_mat= mv_calc_system_mat( fwd_model, img)
0003 % System Matrix for Marco Vauhkonen's EIDORS2D code
0004 % s_mat.E   = FEM system matrix
0005 % s_mat.Ela = Normalised volumes of the elements
0006 % s_mat.D   = The sgradients of the shape functions over each element.
0007 % s_mat.Vols= Normalised volums of the elements
0008 % s_mat.perm= permutation of system matrix
0009 % fwd_model = forward model
0010 % img       = image background for system matrix calc
0011 
0012 % (C) 2009 Andy Adler. License: GPL version 2 or version 3
0013 % $Id: mv_calc_system_mat.html 2819 2011-09-07 16:43:11Z aadler $
0014 
0015 s_mat = eidors_obj('get-cache', fwd_model, 'mv_system_mat', img);
0016 
0017 if ~isempty(s_mat)
0018    eidors_msg('mv_calc_system_mat: using cached value', 3);
0019    return
0020 end
0021 
0022 p= mv_fwd_parameters( fwd_model );
0023 sigma = img.elem_data;
0024 
0025 [Agrad,Kb,M,S,C]=FemMatrix(p.Node,p.Element,p.z_contact);
0026 if all(all( C ~= p.C ))
0027    error(['The required measurement pattern is not compatible' ...
0028          'with that required by eidors2d. Please refer to' ...
0029          'eidors2d_demo1 for an example']);
0030 end
0031 s_mat= UpdateFemMatrix(Agrad,Kb,M,S,sigma);
0032 
0033 eidors_obj('set-cache', fwd_model, 'mv_system_mat', s_mat, img);
0034 eidors_msg('mv_calc_system_mat: setting cached value', 3);

Generated on Tue 09-Aug-2011 11:38:31 by m2html © 2005