


bound1 Computes the boundary integral of one linear basis function in 2D FEM Function int=bound1(g) calculates the boundary integral of one basis function from g(1,:) to g(2,:). INPUT g = integration endpoints OUTPUT int = value of the integral


0001 function int=bound1(g); 0002 0003 %bound1 Computes the boundary integral of one linear basis function in 2D FEM 0004 % Function int=bound1(g) calculates the boundary integral 0005 % of one basis function from g(1,:) to g(2,:). 0006 % 0007 % INPUT 0008 % 0009 % g = integration endpoints 0010 % 0011 % OUTPUT 0012 % 0013 % int = value of the integral 0014 0015 % 10.5. 1996 P. Ronkanen and M. Vauhkonen 0016 % University of Kuopio, Department of Applied Physics, PO Box 1627, 0017 % FIN-70211 Kuopio, Finland, email: Marko.Vauhkonen@uku.fi 0018 0019 0020 int=1/2*sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2); 0021 0022 %w=[1/2,1/2]; 0023 %ip=[1/2-1/6*sqrt(3),1/2+1/6*sqrt(3)]; 0024 %dJt=sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2); 0025 %int=0; 0026 % for ii=1:2 0027 % S=[1-ip(ii);ip(ii)]; 0028 % int=int+w(ii)*S; 0029 % end 0030 %int=int*dJt; 0031