Home > p2plib > resi.m

resi

PURPOSE ^

compute residual for -div(c grad u)+au-f-b grad u=0,

SYNOPSIS ^

function r=resi(p,u,lam)

DESCRIPTION ^

 compute residual for -div(c grad u)+au-f-b grad u=0,

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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;

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