0001 function [c,a,f,b]=chemf(p,u,lam)
0002
0003
0004
0005 u=pdeintrp(p.points,p.tria,u);duv=ones(1,p.nt); D=0.25; r=1.52;
0006 f1=r*u(1,:).*(1-u(1,:)); f2=u(1,:)./(1+u(1,:))-u(2,:); a=0; b=0;
0007 f=[f1;f2];
0008
0009
0010 c1111=D*duv; c1112=0*duv; c1121=0*duv; c1122=D*duv;
0011 c1211=-lam*u(1,:); c1212=0*duv; c1221=0*duv;c1222=-lam*u(1,:);
0012 c2111=0*duv; c2112=0*duv; c2121=0*duv; c2122=0*duv;
0013 c2211=duv; c2212=0*duv; c2221=0*duv; c2222=1*duv;
0014 c=[c1111; c1121; c1112; c1122; c2111; c2121; c2112; c2122; ...
0015 c1211; c1221; c1212; c1222; c2211; c2221; c2212; c2222];