jacobian_3d_fields
PURPOSE
[J] = jacobian_3d_fields(V,Ela,D,elec,vtx,simp,mat_ref,v_f,df, c2f);
SYNOPSIS
function [J] = jacobian_3d_fields(V,Ela,D,elec,vtx,simp,mat_ref,v_f,df, c2f);
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
- jacobian_3d function [J] = jacobian_3d(I,elec,vtx,simp,gnd_ind,mat_ref,zc,v_f,df,tol,perm_sym);
- np_calc_jacobian NP_CALC_JACOBIAN: J= np_calc_jacobian( fwd_model, img)
SOURCE CODE
0001 function [J] = jacobian_3d_fields(V,Ela,D,elec,vtx,simp,mat_ref,v_f,df, c2f);
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 warning('EIDORS:deprecated','JACOBIAN_3D_FIELDS is deprecated as of 07-Jun-2012. ');
0021
0022 [vr,dim] = size(vtx);
0023
0024 if sum(df)~= size(v_f,2);
0025 error('Mismatched data input');
0026 end
0027
0028
0029 V = V(1:vr,:);
0030 v_f = v_f(1:vr,:);
0031
0032 n_elem= size(simp,1);
0033
0034 diag_Ela = diag(Ela(1:dim:size(Ela,1),1:dim:size(Ela,2)));
0035 diag_Ela = spdiags(diag_Ela, 0, n_elem, n_elem);
0036
0037 if nargin>=10
0038 J = zeros(sum(df), size(c2f,2) );
0039 diag_Ela = diag_Ela*c2f;
0040 else
0041 J = zeros(sum(df),n_elem );
0042 end
0043 cnt = 0;
0044
0045 for p=1:size(V,2)
0046
0047 DV = D*V(:,p);
0048 df_idx= sum(df(1:p-1));
0049
0050 for m=1:df(p)
0051
0052 Dvf = D*v_f(:,df_idx + m);
0053
0054 Jrow_x3 = Dvf .* DV ;
0055 Jrow_u = sum(reshape(Jrow_x3,dim,[]),1);
0056
0057
0058 Jrow = Jrow_u * diag_Ela;
0059
0060 cnt = cnt+1;
0061 J(cnt,:) = -Jrow;
0062
0063 end
0064 end
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
Generated on Fri 30-Dec-2022 19:44:54 by m2html © 2005