| MESH toolbox 0.1 Matlab/Octave mesh utils

- Main Page
- Related Pages
- Modules
- Files

- File List
- File Members

All Files Functions Groups Pages
GetMatPrTh2RefTh.m
Go to the documentation of this file.
1 function MatProj=GetMatPrTh2RefTh(nq,e2q)
2 % function MatProj=GetMatPrTh2RefTh(nq,e2q)
3 % Build projection matrix from initial mesh to refine mesh
4 N=size(e2q,1);
5 I=nq+(1:N)'*ones(1,2);
6 I=I(:);
7 J=double(e2q(:));
8 K=ones(N,2)/2;
9 K=K(:);
10 L=(1:nq)';
11 I=[L;I];
12 J=[L;J];
13 K=[ones(nq,1);K];
14 MatProj=sparse(I,J,K,nq+N,nq);
15 end