compute residual for -div(c grad u)+au-f-b grad u=0,
0001 function r=resi(p,u,lam) 0002 % compute residual for -div(c grad u)+au-f-b grad u=0, 0003 [c,a,f,b]=p.f(p,u,lam); bc=p.bcf(p,u,lam); 0004 [K,F]=assempde(bc,p.points,p.edges,p.tria,c,a,f); 0005 if(any(b)); Kadv=assemadv(p.points,p.tria,b); K=K-Kadv; end 0006 r=K*u-F;