GetLStokes

PURPOSE ^

GETLSTOKES - compute L matrix for stokes diagnostic

SYNOPSIS ^

function L=GetLStokes(triaelem,gauss_l1l2l3)

DESCRIPTION ^

GETLSTOKES - compute L matrix for stokes diagnostic

   Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
   For grid i, Li can be expressed in the basic coordinate system by:
   Li_basic=[ h    0    0   0]
              [ 0    h    0   0]
            [ 0    0    h   0]
            [ 0    0    h   0]
            [ h    0    0   0]
            [ 0    h    0   0]
            [ h    0    0   0]
            [ 0    h    0   0]
            [ 0    0    h   0]
            [ 0    0    h   0]
            [ 0    0    h   0]
            [ h    0    0   0]
            [ 0    h    0   0]
            [ 0    0    h   0]
   where h is the interpolation function for grid i.
 
   Usage:

   See also GETL, GETLPRIMESTOKES, CREATEKMATRIX

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function L=GetLStokes(triaelem,gauss_l1l2l3)
0002 %GETLSTOKES - compute L matrix for stokes diagnostic
0003 %
0004 %   Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
0005 %   For grid i, Li can be expressed in the basic coordinate system by:
0006 %   Li_basic=[ h    0    0   0]
0007 %              [ 0    h    0   0]
0008 %            [ 0    0    h   0]
0009 %            [ 0    0    h   0]
0010 %            [ h    0    0   0]
0011 %            [ 0    h    0   0]
0012 %            [ h    0    0   0]
0013 %            [ 0    h    0   0]
0014 %            [ 0    0    h   0]
0015 %            [ 0    0    h   0]
0016 %            [ 0    0    h   0]
0017 %            [ h    0    0   0]
0018 %            [ 0    h    0   0]
0019 %            [ 0    0    h   0]
0020 %   where h is the interpolation function for grid i.
0021 %
0022 %   Usage:
0023 %
0024 %   See also GETL, GETLPRIMESTOKES, CREATEKMATRIX
0025 
0026 numdof=4;
0027 num_grids=3;
0028 
0029 %Get l1l2l3 in basic coordinate system:
0030 l1l2l3=GetNodalFunctions(triaelem,gauss_l1l2l3);
0031 
0032 %Build L:
0033 L=zeros(12,numdof*num_grids);
0034 
0035 for i=1:num_grids,
0036     L(1,numdof*(i-1)+1)=l1l2l3(i); 
0037     L(2,numdof*(i-1)+2)=l1l2l3(i);
0038     L(3,numdof*(i-1)+3)=l1l2l3(i); 
0039     L(4,numdof*(i-1)+3)=l1l2l3(i); 
0040     L(5,numdof*(i-1)+1)=l1l2l3(i); 
0041     L(6,numdof*(i-1)+2)=l1l2l3(i); 
0042     L(7,numdof*(i-1)+1)=l1l2l3(i); 
0043     L(8,numdof*(i-1)+2)=l1l2l3(i); 
0044     L(9,numdof*(i-1)+3)=l1l2l3(i); 
0045     L(10,numdof*(i-1)+3)=l1l2l3(i); 
0046     L(11,numdof*(i-1)+3)=l1l2l3(i); 
0047     L(12,numdof*(i-1)+1)=l1l2l3(i); 
0048     L(13,numdof*(i-1)+2)=l1l2l3(i); 
0049     L(14,numdof*(i-1)+3)=l1l2l3(i); 
0050     
0051 %other terms are 0
0052 end

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