Home > p2plib > bgradu2f.m

bgradu2f

PURPOSE ^

include b grad u into f for error-est and mesh-adapt.

SYNOPSIS ^

function fb=bgradu2f(p,f,b,u)

DESCRIPTION ^

 include b grad u into f for error-est and mesh-adapt.
 f,b as returned from p.f

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fb=bgradu2f(p,f,b,u)
0002 % include b grad u into f for error-est and mesh-adapt.
0003 % f,b as returned from p.f
0004 [ux,uy]=pdegrad(p.points,p.tria,u);
0005 fb=f;n=p.neq; 
0006 for i=1:n
0007     for j=1:n
0008         fb(i,:)=fb(i,:)+b(2*n*(j-1)+2*(i-1)+1,:).*ux(j,:)...
0009             +b(2*n*(j-1)+2*(i-1)+2,:).*uy(j,:);
0010     end
0011 end

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