boundquad2

PURPOSE ^

boundquad2 Computes the boundary integral of the product of two quadratic basis functions

SYNOPSIS ^

function int=boundquad2(g);

DESCRIPTION ^

boundquad2 Computes the boundary integral of the product of two quadratic basis functions 
 Function int=boundquad2(g) calculates the boundary integral
 of the product of two quadratic basis function over the curve defined by the coordinates in g.

 INPUT

 g = global coordinates of the integration curve

 OUTPUT

 int = value of the integral

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function int=boundquad2(g);
0002 
0003 %boundquad2 Computes the boundary integral of the product of two quadratic basis functions
0004 % Function int=boundquad2(g) calculates the boundary integral
0005 % of the product of two quadratic basis function over the curve defined by the coordinates in g.
0006 %
0007 % INPUT
0008 %
0009 % g = global coordinates of the integration curve
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 w=[5/18,8/18,5/18];
0020 ip=[1/2-1/10*sqrt(15),1/2,1/2+1/10*sqrt(15)];
0021 int=0;
0022  for ii=1:3
0023   S=[2*ip(ii)^2-3*ip(ii)+1; ...
0024      -4*ip(ii)^2+4*ip(ii); ...
0025      2*ip(ii)^2-ip(ii)];
0026   dJt=sqrt((g(1,1)*(4*ip(ii)-3)+g(2,1)*(4-8*ip(ii))+g(3,1)*(4*ip(ii)-1))^2+ ...
0027             (g(1,2)*(4*ip(ii)-3)+g(2,2)*(4-8*ip(ii))+g(3,2)*(4*ip(ii)-1))^2);
0028   int=int+w(ii)*S*S'*dJt;
0029  end
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044

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