boundquad1

PURPOSE ^

boundquad1 Computes the boundary integral of one quadratic basis functions

SYNOPSIS ^

function int=boundquad1(g);

DESCRIPTION ^

boundquad1 Computes the boundary integral of one quadratic basis functions
 Function int=boundquad1(g) calculates the boundary integral
 of one 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=boundquad1(g);
0002 
0003 %boundquad1 Computes the boundary integral of one quadratic basis functions
0004 % Function int=boundquad1(g) calculates the boundary integral
0005 % of one 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 
0020 w=[1/2,1/2];
0021 ip=[1/2-1/6*sqrt(3),1/2+1/6*sqrt(3)];
0022 int=0;
0023  for ii=1:2
0024   S=[2*ip(ii)^2-3*ip(ii)+1; ...
0025      -4*ip(ii)^2+4*ip(ii); ...
0026      2*ip(ii)^2-ip(ii)];
0027   dJt=sqrt((g(1,1)*(4*ip(ii)-3)+g(2,1)*(4-8*ip(ii))+g(3,1)*(4*ip(ii)-1))^2+ ...
0028             (g(1,2)*(4*ip(ii)-3)+g(2,2)*(4-8*ip(ii))+g(3,2)*(4*ip(ii)-1))^2);
0029   int=int+w(ii)*S*dJt;
0030  end
0031 
0032 
0033 
0034 
0035

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