GetJacobian

PURPOSE ^

GETJACOBIAN - computes the jacobian for a triaelem

SYNOPSIS ^

function J=GetJacobian(triaelem,xyz_list,gauss_l1l2l3)

DESCRIPTION ^

GETJACOBIAN - computes the jacobian for a triaelem

   Usage:
      J=GetJacobian(triaelem,xyz_list,gauss_coord)

   See also GETJACOBIANDETERMINANT, GETJACOBIANINVERT

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function J=GetJacobian(triaelem,xyz_list,gauss_l1l2l3)
0002 %GETJACOBIAN - computes the jacobian for a triaelem
0003 %
0004 %   Usage:
0005 %      J=GetJacobian(triaelem,xyz_list,gauss_coord)
0006 %
0007 %   See also GETJACOBIANDETERMINANT, GETJACOBIANINVERT
0008 
0009 %The Jacobian is constant over the element, discard the gaussian points.
0010 
0011 %Non optimized version
0012 %J=zeros(2,2);
0013 %
0014 %x1=xyz_list(1,1);
0015 %y1=xyz_list(1,2);
0016 %x2=xyz_list(2,1);
0017 %y2=xyz_list(2,2);
0018 %x3=xyz_list(3,1);
0019 %y3=xyz_list(3,2);
0020 %
0021 %J(1,1)=1.0/2.0*(x2-x1);
0022 %J(1,2)=sqrt(3.0)/6.0*(2*x3-x1-x2);
0023 %J(2,1)=1.0/2.0*(y2-y1);
0024 %J(2,2)=sqrt(3.0)/6.0*(2*y3-y1-y2);
0025 
0026 
0027 %Same code, a little optimized
0028 J=[      1.0/2.0*(xyz_list(2,1)-xyz_list(1,1))    sqrt(3.0)/6.0*(2*xyz_list(3,1)-xyz_list(1,1)-xyz_list(2,1))
0029       1.0/2.0*(xyz_list(2,2)-xyz_list(1,2))    sqrt(3.0)/6.0*(2*xyz_list(3,2)-xyz_list(1,2)-xyz_list(2,2))];
0030 
0031

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003