


grinprodgaus Computes the integral of the product of the gradients in 2D FEM The function int=grinprodgaus(g,sigma); calculates the gradient part in the linear FEM in 2D EIT. INPUT g = nodal coordinates sigma = conductivity of the element OUTPUT int = value of the integral


0001 function int=grinprodgaus(g,sigma); 0002 0003 %grinprodgaus Computes the integral of the product of the gradients in 2D FEM 0004 % The function int=grinprodgaus(g,sigma); 0005 % calculates the gradient part in the linear 0006 % FEM in 2D EIT. 0007 % 0008 % INPUT 0009 % 0010 % g = nodal coordinates 0011 % sigma = conductivity of the element 0012 % 0013 % OUTPUT 0014 % 0015 % int = value of the integral 0016 0017 % P. Ronkanen and M. Vauhkonen 10.5. 1996 0018 % University of Kuopio, Department of Applied Physics, PO Box 1627, 0019 % FIN-70211 Kuopio, Finland, email: Marko.Vauhkonen@uku.fi 0020 0021 0022 w=[1/6*ones(3,1)]; 0023 ip=[1/2 0;1/2 1/2;0 1/2]; 0024 L=[-1 1 0;-1 0 1]; 0025 Jt=L*g; 0026 iJt=inv(Jt); 0027 dJt=abs(det(Jt)); 0028 G=iJt*L; 0029 %int=0; 0030 % for ii=1:3 0031 % int=int+w(ii)*G'*G; 0032 % end 0033 %int=sigma*int*dJt; 0034 int=1/2*sigma*G'*G*dJt; 0035 0036