Home > Src > Elliptic_2d > Schur > cosnovg.m

cosnovg

PURPOSE ^

COSNOVG : constructs matrix novg realizing operator R_{\Gamma_m}

SYNOPSIS ^

function [novg]=cosnovg(xyi,noei,ifroi,lgamma,ldnov,novi,nvli);

DESCRIPTION ^

 COSNOVG : constructs matrix novg realizing operator R_{\Gamma_m}

   R_{\Gamma_m}: the restriction operator from the vector 
   of coefficient unknowns related
   to the nodes of Gamma to only those associated with Gamma_m=Gamma \cap
   \partial\Omega_m.  (see CHQZ3, pag. 394)

 [novg]=cosnovg(xyi,noei,ifroi,lgamma,ldnov,novi,nvli);

 Input: xyi = 2-indexes array of coordinates of nodes internal to Omega
        noei = number of nodes internal to Omega
        ifroi =  restriction of ifro to nodes internal to Omega
        lgamma =  list of those nodes of Omega (without boundary) which
        belong to Gamma
        ldnov, leading dimension of nov
        novi = 2-indexes array of size (max(nvli),ne), computed in cosnovi
        nvli = column array. nvli(ie) is the number of nodes of \Omega_ie
        internal to Omega.

 Output: novg = 2-indexes array of size (ldnov,ne)
         novg(i,ie)= 0 if node x_i of Omega_ie does not belong to Gamma
                    = j if node x_i of Omega_ie is the node j of Gamma 

 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 [novg]=cosnovg(xyi,noei,ifroi,lgamma,ldnov,novi,nvli);
0002 % COSNOVG : constructs matrix novg realizing operator R_{\Gamma_m}
0003 %
0004 %   R_{\Gamma_m}: the restriction operator from the vector
0005 %   of coefficient unknowns related
0006 %   to the nodes of Gamma to only those associated with Gamma_m=Gamma \cap
0007 %   \partial\Omega_m.  (see CHQZ3, pag. 394)
0008 %
0009 % [novg]=cosnovg(xyi,noei,ifroi,lgamma,ldnov,novi,nvli);
0010 %
0011 % Input: xyi = 2-indexes array of coordinates of nodes internal to Omega
0012 %        noei = number of nodes internal to Omega
0013 %        ifroi =  restriction of ifro to nodes internal to Omega
0014 %        lgamma =  list of those nodes of Omega (without boundary) which
0015 %        belong to Gamma
0016 %        ldnov, leading dimension of nov
0017 %        novi = 2-indexes array of size (max(nvli),ne), computed in cosnovi
0018 %        nvli = column array. nvli(ie) is the number of nodes of \Omega_ie
0019 %        internal to Omega.
0020 %
0021 % Output: novg = 2-indexes array of size (ldnov,ne)
0022 %         novg(i,ie)= 0 if node x_i of Omega_ie does not belong to Gamma
0023 %                    = j if node x_i of Omega_ie is the node j of Gamma
0024 %
0025 % References: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0026 %                    "Spectral Methods. Fundamentals in Single Domains"
0027 %                    Springer Verlag, Berlin Heidelberg New York, 2006.
0028 %             CHQZ3 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang,
0029 %                    "Spectral Methods. Evolution to Complex Geometries
0030 %                     and Applications to Fluid DynamicsSpectral Methods"
0031 %                    Springer Verlag, Berlin Heidelberg New York, 2007.
0032 
0033 %   Written by Paola Gervasio
0034 %   $Date: 2007/04/01$
0035 
0036 
0037 
0038 ngamma=length(lgamma);
0039 ne=length(nvli);
0040 novg=zeros(ldnov,ne);
0041 for ie=1:ne
0042 mn=nvli(ie);
0043 for i=1:mn
0044 ig=novi(i,ie);
0045 if(ifroi(ig)==-1)
0046 x=xyi(ig,1); y=xyi(ig,2);
0047 trov=0; j=0;
0048 while j <=ngamma & trov==0
0049 j=j+1; 
0050 x1=xyi(lgamma(j),1); y1=xyi(lgamma(j),2);
0051 if(x==x1 & y==y1)
0052 trov=1; novg(i,ie)=j;
0053 end
0054 end
0055 end
0056 end
0057 end
0058 
0059 return

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