bound2

PURPOSE ^

bound2 Computes the boundary integral of the product of two linear basis function in 2D FEM

SYNOPSIS ^

function int=bound2(g);

DESCRIPTION ^

bound2 Computes the boundary integral of the product of two linear basis function in 2D FEM
 Function int=bound2(g) calculates the boundary integral
 of the product of two basis function from g(1,:) to g(2,:).

 INPUT

 g = integration endpoints

 OUTPUT

 int = value of the integral

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function int=bound2(g);
0002 
0003 %bound2 Computes the boundary integral of the product of two linear basis function in 2D FEM
0004 % Function int=bound2(g) calculates the boundary integral
0005 % of the product of two 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 w=[1/2,1/2];
0021 ip=[1/2-1/6*sqrt(3),1/2+1/6*sqrt(3)];
0022 dJt=sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2); 
0023 int=0;
0024  for ii=1:2
0025   S=[1-ip(ii);ip(ii)];
0026   int=int+w(ii)*S*S';
0027  end
0028 int=int*dJt;

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