Home > p2plib > n2triamat.m

n2triamat

PURPOSE ^

compute transf.-matrix from nodal values to triangle centers values

SYNOPSIS ^

function C=n2triamat(p,t)

DESCRIPTION ^

 compute transf.-matrix from nodal values to triangle centers values

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function C=n2triamat(p,t) 
0002 % compute transf.-matrix from nodal values to triangle centers values
0003 np=size(p,2); nt=size(t,2);
0004 A=sparse(ones(3,1)*(1:nt),t(1:3,:),1,nt,np);
0005 B=sparse(1:nt,1:nt,1./sum(A.'),nt,nt);
0006 C=B*A;

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005