grinprodgausnodequad

PURPOSE ^

grinprodgausnodequad Computes the gradient part of the system matrix

SYNOPSIS ^

function int=grinprodgausnodequad(g,I);

DESCRIPTION ^

grinprodgausnodequad Computes the gradient part of the system matrix
in the quadratic basis case. The conductivity  is in the linear basis.
 Function int=grinprodgausnodequad(g,I);
 computes the gradient part of the system matrix
 in the quadratic basis case. The conductivity  is in the linear basis.

 INPUT

 g = nodes of the element
 I = index of  the chosen node 

 OUTPUT

 int = three dimensional array or 3x3 matrix of the values of integral

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function int=grinprodgausnodequad(g,I);
0002 
0003 %grinprodgausnodequad Computes the gradient part of the system matrix
0004 %in the quadratic basis case. The conductivity  is in the linear basis.
0005 % Function int=grinprodgausnodequad(g,I);
0006 % computes the gradient part of the system matrix
0007 % in the quadratic basis case. The conductivity  is in the linear basis.
0008 %
0009 % INPUT
0010 %
0011 % g = nodes of the element
0012 % I = index of  the chosen node
0013 %
0014 % OUTPUT
0015 %
0016 % int = three dimensional array or 3x3 matrix of the values of integral
0017 
0018 % P. Ronkanen and M. Vauhkonen 10.5. 1996. Modified by M. Vauhkonen for EIDORS
0019 % 11.5.2000.
0020 % University of Kuopio, Department of Applied Physics, PO Box 1627,
0021 % FIN-70211 Kuopio, Finland, email: Marko.Vauhkonen@uku.fi
0022 
0023 w=[1/6*ones(3,1)];
0024 ip=[1/2 0;1/2 1/2;0 1/2];
0025 
0026 int=0;
0027  for ii=1:3
0028   S=[1-ip(ii,1)-ip(ii,2);ip(ii,1);ip(ii,2)];
0029   L=[4*(ip(ii,1)+ip(ii,2))-3, -8*ip(ii,1)-4*ip(ii,2)+4, ...
0030      4*ip(ii,1)-1, 4*ip(ii,2), 0, -4*ip(ii,2); ...
0031      4*(ip(ii,1)+ip(ii,2))-3, -4*ip(ii,1), ...
0032      0, 4*ip(ii,1), 4*ip(ii,2)-1, -8*ip(ii,2)-4*ip(ii,1)+4];
0033   Jt=L*g;
0034   iJt=inv(Jt);
0035   dJt=abs(det(Jt));
0036   G=iJt*L;
0037   int=int+w(ii)*S(I)*G'*G*dJt;
0038  end
0039 
0040 
0041 
0042 
0043 
0044 
0045

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