0001
0002 close all; clear all;
0003
0004 p=[];p=acinit(p);p=cont(p);
0005 q=swibra('p','bp1','q',0.1);
0006 q.amod=5;q.nsteps=10;q.lammax=3;q.smod=5;
0007 q=cont(q);
0008 r=swibra('p','bp2','r',0.1);
0009 r.amod=5;r.nsteps=15;r.lammax=4;r=cont(r);
0010
0011 figure(3);clf; plotbra(p,3,2,'ms',8,'lw',6);
0012 plotbra(q,3,2,'ms',8,'lab',12,'lw',4, 'cl', 'b');
0013 plotbra(r,3,2,'ms',8,'lab',10,'lw',4, 'cl', 'r');
0014 xlabel('\lambda');ylabel('||u||_2');
0015
0016 plotsolf('q','p12',5,1,2); plotsolf('r','p10',7,1,2);
0017
0018 clf(2); w=loadp('q','p12','w');
0019 w.up1=w.lam;
0020 w.lam=0.25;
0021 w.lammin=0.1;w.nsteps=20; w.restart=1; w.ds=-0.01;
0022 w.xi=1e-6;
0023 w.f=@acfmu;w.jac=@acjacmu;
0024 w.jsw=1;
0025
0026 w=cont(w); plotsol(w,8,1,2);title('u at \mu=0.1, \lambda=2');
0027
0028 q=loadp('q','p3','q'); Gu=getGu(q,q.u,q.lam,r);
0029 [K,MId]=assema(q.points,q.tria,0,1,0);
0030 q.evopts=[]; q.evopts.disp=0;[phi1,mu1]=eigs(Gu,MId,1,0,q.evopts);
0031 mypause('Perturb in one direction');
0032 qa=q;qa.u=q.u-0.2*phi1;qa=tint(qa,0.2,200,40);plotsol(qa,9,1,1);
0033 mypause('Perturb in the other direction');
0034 qb=q;qb.u=q.u+0.2*phi1;qb=tint(qb,0.3,600,60);