Home > Src > Level_1 > ell_1d_se.m

ell_1d_se

PURPOSE ^

ELL_1D_SE Assembles 1D global SEM matrix associated to -nu u''+beta u'+gam u

SYNOPSIS ^

function [A]=ell_1d_se(npdx,ne,nov,nu,beta,gam,wx,dx,jacx);

DESCRIPTION ^

 ELL_1D_SE Assembles 1D global SEM matrix associated to  -nu u''+beta u'+gam u

    [A]=ell_1d_se(npdx,ne,nov,nu,beta,gam,wx,dx,jacx); produces the matrix

        A_{ij}=nu*((phi_j)',(phi_i)')+beta((phi_j)',phi_i)+gam(phi_j,phi_i)

        of size
        (noe,noe) where noe=nov(npdx,ne) is the number of d.o.f.

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

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