electrlen

PURPOSE ^

electrlen Computes the length of the electrode in the case of isoparametric (quadratic) triangular element

SYNOPSIS ^

function int=electrlen(g);

DESCRIPTION ^

electrlen Computes the length of the electrode in the case of isoparametric (quadratic) triangular element 
 Function int=electrlen(g) computes the length of the electrode in the case of isoparametric triangular element
 The electrode is 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=electrlen(g);
0002 
0003 %electrlen Computes the length of the electrode in the case of isoparametric (quadratic) triangular element
0004 % Function int=electrlen(g) computes the length of the electrode in the case of isoparametric triangular element
0005 % The electrode is 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   dJt=sqrt((g(1,1)*(4*ip(ii)-3)+g(2,1)*(4-8*ip(ii))+g(3,1)*(4*ip(ii)-1))^2+ ...
0025             (g(1,2)*(4*ip(ii)-3)+g(2,2)*(4-8*ip(ii))+g(3,2)*(4*ip(ii)-1))^2);
0026   int=int+w(ii)*dJt;
0027  end
0028 
0029 
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037

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