Home > Src > Level_1 > stiff_1d_se.m

stiff_1d_se

PURPOSE ^

STIFF_1D_SE Assembles 1D global SEM matrix associated to ((phi_j)', (phi_i)')

SYNOPSIS ^

function [A]=stiff_1d_se(npdx,ne,nov,wx,dx,jacx);

DESCRIPTION ^

 STIFF_1D_SE Assembles 1D global SEM matrix associated to  ((phi_j)', (phi_i)')


    [A]=stiff_1d_se(npdx,ne,nov,wx,dx,jacx); produces the matrix
        A_{ij}=((phi_j)', (phi_i)') of size
        (noe,noe) where noe=nov(npdx,ne) is the number of d.o.f.

 Input : npdx = number of nodes in every element
         ne = number of spectral elements
         nov = local -global map, previously generated by cosnov1d
         wx = npdx LGL weigths in [-1,1],
            (produced by calling [x,w]=xwlgl(npdx))
            (npdx = number of nodes, =n+1, if n=polynomial degree)
         dx = first derivative LGL matrix (produced by calling d=derlgl(x,npdx))
         jacx =  jacobian of the map F:[-1,1]---->[xa_ie,b_ie]

 Output: A = matrix (noe,noe) 


 Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
                    "Spectral Methods. Fundamentals in Single Domains"
                    Springer Verlag, Berlin Heidelberg New York, 2006.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [A]=stiff_1d_se(npdx,ne,nov,wx,dx,jacx);
0002 % STIFF_1D_SE Assembles 1D global SEM matrix associated to  ((phi_j)', (phi_i)')
0003 %
0004 %
0005 %    [A]=stiff_1d_se(npdx,ne,nov,wx,dx,jacx); produces the matrix
0006 %        A_{ij}=((phi_j)', (phi_i)') of size
0007 %        (noe,noe) where noe=nov(npdx,ne) is the number of d.o.f.
0008 %
0009 % Input : npdx = number of nodes in every element
0010 %         ne = number of spectral elements
0011 %         nov = local -global map, previously generated by cosnov1d
0012 %         wx = npdx LGL weigths in [-1,1],
0013 %            (produced by calling [x,w]=xwlgl(npdx))
0014 %            (npdx = number of nodes, =n+1, if n=polynomial degree)
0015 %         dx = first derivative LGL matrix (produced by calling d=derlgl(x,npdx))
0016 %         jacx =  jacobian of the map F:[-1,1]---->[xa_ie,b_ie]
0017 %
0018 % Output: A = matrix (noe,noe)
0019 %
0020 %
0021 % Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0022 %                    "Spectral Methods. Fundamentals in Single Domains"
0023 %                    Springer Verlag, Berlin Heidelberg New York, 2006.
0024 
0025 %   Written by Paola Gervasio
0026 %   $Date: 2007/04/01$
0027 
0028 noe=nov(npdx,ne);
0029 A=sparse(noe,noe);
0030 for ie=1:ne
0031 Al=stiff_1d_sp(wx,dx,jacx(ie));
0032 A(nov(1:npdx,ie),nov(1:npdx,ie))=A(nov(1:npdx,ie),nov(1:npdx,ie))+Al;
0033 end
0034 
0035

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