0001 function [c,fu,flam,b]=rbconvjac(p,u,lam)
0002
0003 [ux,uz]=pdegrad(p.points,p.tria,u);
0004 psix=ux(1,:); psiz=uz(1,:);
0005 omx =ux(2,:); omz =uz(2,:);
0006 Tx =ux(3,:); Tz =uz(3,:);
0007 R=lam; P=1;
0008 c=[1;1;P;P;1;1];fu = zeros(p.neq^2,1); fu(4)=-1;
0009 flam=[zeros(1,p.nt);Tx;zeros(1,p.nt)];
0010 b = zeros(p.neq^2*2,p.nt);
0011
0012 b(2*p.neq*2+3,:) = R*P*ones(1,p.nt);
0013 b(3,:) = -omz;
0014 b(2*p.neq+4,:) = -psix;
0015 b(2*p.neq+3,:) = psiz;
0016 b(4,:) = omx;
0017
0018 b(5,:) = ones(1,p.nt)-Tz;
0019 b(3*2*p.neq,:) = -psix;
0020 b(3*2*p.neq-1,:) = psiz;
0021 b(6,:) = Tx;