Home > Src > Elliptic_2d > Schwarz > stiffq1_se.m

stiffq1_se

PURPOSE ^

STIFFQ1_SE Assembles Q1 stiffness local matrices on extended elements

SYNOPSIS ^

function [A,ww]=stiffq1_se(ipar,ifro,nov,wx,dx,jacx,wy,dy,jacy);

DESCRIPTION ^

 STIFFQ1_SE Assembles Q1 stiffness local matrices on extended elements

 [A,ww]=stiffq1_se(ipar,ifro,nov,wx,dx,jacx,wy,dy,jacy);

 Input: ipar = array of parameters, set in the calling function
        ifro  = column array of length noe=nov(npdx*npdy,ne):
            if (x_i,y_i) is internal to Omega then ifro(i)=0,
            if (x_i,y_i) is on \partial\Omega then ifro(i)=1,
        nov = local -global map, previously generated by cosnov_2d
         wx = npdx LGL weigths in [-1,1],
            (produced by calling [x,wx]=xwlgl(npdx))
         dx =first derivative LGL matrix (by calling dx=derlgl(x,npdx))
         jacx = array (length(jacx)=ne); jacx(ie)= (x_V2_ie-x_V1_ie)/2
         wy = npdy LGL weigths in [-1,1],
            (produced by calling [y,wy]=xwlgl(npdy))
         dy =first derivative LGL matrix (by calling dy=derlgl(y,npdy))
         jacy = array (length(jacy)=ne); jacy(ie)= (y_V3_ie-y_V1_ie)/2
 
 Output: A = local stiffness Q1 matrix on the extended macro element
         ww = local mass Q1 matrix on the extended macro element

 References: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
                    "Spectral Methods. Fundamentals in Single Domains"
                    Springer Verlag, Berlin Heidelberg New York, 2006.
             CHQZ3 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
                    "Spectral Methods. Evolution to Complex Geometries 
                     and Applications to Fluid DynamicsSpectral Methods"
                    Springer Verlag, Berlin Heidelberg New York, 2007.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [A,ww]=stiffq1_se(ipar,ifro,nov,wx,dx,jacx,wy,dy,jacy);
0002 % STIFFQ1_SE Assembles Q1 stiffness local matrices on extended elements
0003 %
0004 % [A,ww]=stiffq1_se(ipar,ifro,nov,wx,dx,jacx,wy,dy,jacy);
0005 %
0006 % Input: ipar = array of parameters, set in the calling function
0007 %        ifro  = column array of length noe=nov(npdx*npdy,ne):
0008 %            if (x_i,y_i) is internal to Omega then ifro(i)=0,
0009 %            if (x_i,y_i) is on \partial\Omega then ifro(i)=1,
0010 %        nov = local -global map, previously generated by cosnov_2d
0011 %         wx = npdx LGL weigths in [-1,1],
0012 %            (produced by calling [x,wx]=xwlgl(npdx))
0013 %         dx =first derivative LGL matrix (by calling dx=derlgl(x,npdx))
0014 %         jacx = array (length(jacx)=ne); jacx(ie)= (x_V2_ie-x_V1_ie)/2
0015 %         wy = npdy LGL weigths in [-1,1],
0016 %            (produced by calling [y,wy]=xwlgl(npdy))
0017 %         dy =first derivative LGL matrix (by calling dy=derlgl(y,npdy))
0018 %         jacy = array (length(jacy)=ne); jacy(ie)= (y_V3_ie-y_V1_ie)/2
0019 %
0020 % Output: A = local stiffness Q1 matrix on the extended macro element
0021 %         ww = local mass Q1 matrix on the extended macro element
0022 %
0023 % References: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0024 %                    "Spectral Methods. Fundamentals in Single Domains"
0025 %                    Springer Verlag, Berlin Heidelberg New York, 2006.
0026 %             CHQZ3 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0027 %                    "Spectral Methods. Evolution to Complex Geometries
0028 %                     and Applications to Fluid DynamicsSpectral Methods"
0029 %                    Springer Verlag, Berlin Heidelberg New York, 2007.
0030 
0031 %   Written by Paola Gervasio
0032 %   $Date: 2007/04/01$
0033 
0034 
0035 noe=ipar(7); ne=ipar(6); npdx=ipar(1); npdy=ipar(2); mn=ipar(3);
0036 A=sparse(noe,noe);
0037 ww=zeros(noe,1);
0038 for ie=1:ne
0039 jac=jacx(ie)*jacy(ie);
0040 [Al]=stiff_2d_sp(wx,dx,jacx(ie),wy,dy,jacy(ie));
0041 A(nov(1:mn,ie),nov(1:mn,ie))=A(nov(1:mn,ie),nov(1:mn,ie))+Al;   
0042 ww(nov(1:mn,ie))=ww(nov(1:mn,ie))+ones(4,1)*jac;
0043 end
0044

Generated on Fri 21-Sep-2007 10:07:00 by m2html © 2003