COSNOVI : constructs matrix novi realizing operator R_m R_m is the restriction operator from the vector of coefficient unknowns related to the nodes of Omega (closed) to the vector of coefficient unknowns related to the nodes of Omega_m (closed) Input: nov = 2-index array of local to global map, size(nov)=[max(npdx*npdy),ne] 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, lint = list of those nodes of Omega (close) which are internal to Omega. Output: 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.
0001 function [novi,nvli]=cosnovi(nov,ifro,lint) 0002 % COSNOVI : constructs matrix novi realizing operator R_m 0003 % 0004 % R_m is the restriction operator from the vector 0005 % of coefficient unknowns related to the nodes of Omega (closed) to the 0006 % vector of coefficient unknowns related to the nodes of Omega_m (closed) 0007 % 0008 % Input: nov = 2-index array of local to global map, 0009 % size(nov)=[max(npdx*npdy),ne] 0010 % ifro = column array of length noe=nov(npdx*npdy,ne): 0011 % if (x_i,y_i) is internal to Omega then ifro(i)=0, 0012 % if (x_i,y_i) is on \partial\Omega then ifro(i)=1, 0013 % lint = list of those nodes of Omega (close) which 0014 % are internal to Omega. 0015 % 0016 % Output: novi = 2-indexes array of size (max(nvli),ne), computed in cosnovi 0017 % nvli = column array. nvli(ie) is the number of nodes of \Omega_ie 0018 % internal to Omega. 0019 % 0020 0021 % Written by Paola Gervasio 0022 % $Date: 2007/04/01$ 0023 0024 0025 0026 0027 [mn,ne]=size(nov); 0028 nvli=zeros(ne,1); 0029 nint=length(lint); 0030 novi=zeros(mn,ne); 0031 0032 for ie=1:ne 0033 k=0; 0034 for i=1:mn 0035 ip=nov(i,ie); 0036 if(ifro(ip)~=1) 0037 k=k+1; trov=0; 0038 j=1; 0039 while j<=nint & trov==0 0040 if(ip==lint(j)) 0041 novi(k,ie)=j; trov=1; 0042 end 0043 j=j+1; 0044 end 0045 end 0046 end 0047 nvli(ie)=k; 0048 end 0049 0050 return