grinprodgausnode

PURPOSE ^

grinprodgausnode Computes the gradient part of the system matrix

SYNOPSIS ^

function int=grinprodgausnode(g,I);

DESCRIPTION ^

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

 INPUT

 g = nodes of the element
 I = index of  the chosen node (optional)

 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=grinprodgausnode(g,I);
0002 
0003 %grinprodgausnode Computes the gradient part of the system matrix
0004 %in the linear basis case. The conductivity  is also in the linear basis.
0005 % Function int=grinprodgausnode(g,I);
0006 % computes the gradient part of the system matrix
0007 % in the linear basis case. The conductivity  is also in the linear basis.
0008 %
0009 % INPUT
0010 %
0011 % g = nodes of the element
0012 % I = index of  the chosen node (optional)
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 
0024 
0025 w=[1/6*ones(3,1)];
0026 ip=[1/2 0;1/2 1/2;0 1/2];
0027 L=[-1 1 0;-1 0 1];
0028 Jt=L*g;
0029 iJt=inv(Jt);
0030 dJt=abs(det(Jt));
0031 G=iJt*L;
0032 GdJt=G'*G*dJt;
0033 msg=max(size(g));
0034 
0035 if nargin > 1
0036  S=[[1-ip(1,1)-ip(1,2);ip(1,1);ip(1,2)],[1-ip(2,1)-ip(2,2);ip(2,1);ip(2,2)],[1-ip(3,1)-ip(3,2);ip(3,1);ip(3,2)]]*w;
0037  int=S(I)*GdJt;
0038 else
0039   int=zeros(msg,msg,3);
0040   S=[[1-ip(1,1)-ip(1,2);ip(1,1);ip(1,2)],[1-ip(2,1)-ip(2,2);ip(2,1);ip(2,2)],[1-ip(3,1)-ip(3,2);ip(3,1);ip(3,2)]]*w;
0041  for jj=1:3
0042   int(:,:,jj)=S(jj)*GdJt;
0043  end
0044 end
0045 
0046 
0047 
0048 
0049 
0050

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