Contents

init, and find bifpoints from trivial branch

ndim=2; dir='tr'; p=[]; lx=pi; nx=30; par=-0.3 ; %    r
p=rotinit(p,nx,par); p=setfn(p,dir);
p.sol.ds=0.05; p.nc.dsmax=0.1;
p.nc.mu1=0.05; p.nc.mu2=0.003; % a rather large mu2 ...
p.nc.ilam=1; p.nc.bisecmax=20; % rather large, i.e., many biscetions for localization
inires=0
first res=0
Problem directory name: tr

first 6 branches;

this may take some time; you might want to change bnr=1:6 to, e.g.,bnr=1;

para=4; ds=0.2; dsmax=1; xi=1e-2; nsteps=10;
figure(2); clf; aux=[]; aux.tl=11;
for bnr=1:6
switch bnr
 case 1; p=hoswibra('tr','hpt1',ds,para,'h1',aux);
 case 2; p=hoswibra('tr','hpt2',ds,para,'h2',aux);
 case 3; p=hoswibra('tr','hpt3',0.3,para,'h3',aux);
 case 4; p=hoswibra('tr','hpt4',ds,para,'h4',aux);
 case 5; p=hoswibra('tr','hpt5',ds,para,'h5',aux);
 case 6; p=hoswibra('tr','hpt6',ds,para,'h6',aux);
end
p.hopf.xi=xi; p.hopf.jac=1; p.nc.dsmax=dsmax;
p.fuha.blss=@mbel; p.nc.mbw=2; p.hopf.ilss=0; % set to 0 if no ilupack
p.usrlam=[]; tic; p=cont(p,nsteps);  toc
end
Problem directory name: h1
real(mu)=-1.88314e-08, imag(mu)=0.968107
lam=-0.210316, om=0.968107,  NF-coeffis: dlam=1, alpha=21.8082
arc.parametr, lambda-guess=-0.20864
max|y-u0|=0.959237, res=0.000941571
step  lambda      y-axis       res    iter  ds         T        nT   
   1   -0.21030    0.00233  3.650e-13  4    0.40000    6.71247   11   -0.00008    0.00075
   2   -0.20843    0.02690  1.546e-10  2    0.80000    6.71226   11   -0.00095    0.00858
   3   -0.19564    0.07600  2.510e-10  2    0.80000    6.71092   11   -0.00231    0.02301
   4   -0.17212    0.12487  4.833e-10  2    0.80000    6.70873   11   -0.00309    0.03545
   5   -0.13917    0.17341  2.201e-10  2    0.80000    6.70606   11   -0.00354    0.04675
   6   -0.09736    0.22169  5.390e-11  2    0.80000    6.70309   11   -0.00385    0.05770
   7   -0.04682    0.26977  3.032e-11  2    0.80000    6.69991   11   -0.00410    0.06863
   8    0.01250    0.31771  2.351e-11  2    0.80000    6.69655   11   -0.00428    0.07961
   9    0.08062    0.36556  1.086e-10  2    0.80000    6.69306   11   -0.00442    0.09063
  10    0.15758    0.41330  2.154e-11  2    0.80000    6.68950   11   -0.00448    0.10164
Elapsed time is 309.851343 seconds.
Problem directory name: h2
real(mu)=2.76482e-08, imag(mu)=0.966821
lam=-0.141407, om=0.966821,  NF-coeffis: dlam=1, alpha=19.2416
...

BD, L^2

bpcmp=5; figure(3); clf;
plotbraf('tr','pt30',3,bpcmp,'cl','k');
plotbraf('h1','pt10',3,bpcmp,'lab',10,'cl','b');
plotbraf('h2','pt10',3,bpcmp,'lab',10,'cl','r');
plotbraf('h3','pt10',3,bpcmp,'lab',10,'cl','m');
plotbraf('h4','pt10',3,bpcmp,'lab',10,'cl','b');
plotbraf('h5','pt10',3,bpcmp,'lab',10,'cl','r');
plotbraf('h6','pt10',3,bpcmp,'lab',10,'cl','m');
axis([-0.3 0.65 0 0.5]); xlabel('r'); ylabel('||u||_*');

soln plot, here use specialized 'hoplot' !

pstyle=2;
hoplotrotf('h1','pt10',4,1,pstyle); pause;
hoplotrotf('h2','pt10',4,1,pstyle); pause;
hoplotrotf('h3','pt10',4,1,pstyle); pause;
hoplotrotf('h4','pt10',4,1,pstyle); pause;
hoplotrotf('h5','pt10',4,1,pstyle); pause;
hoplotrotf('h6','pt10',4,1,pstyle);
lam=0.157575
lam=0.171211
lam=0.171849
lam=0.137831
lam=0.784676
lam=0.466021

stab-cmds

p=loadp('h3','pt10'); hoplotrot(p,1,1,2); dir='stab3';
p.u(1:p.nu)=p.hopf.y(1:p.nu,1); u0=p.u(1:p.nu); p=setfn(p,dir);
ts=[]; t0=0; npp=40; pmod=50; smod=5; tsmod=1; nc=0;
Problem directory name: stab3

call tint and plot time-series

nt=200; [p,t0,ts,nc]=hotintxs(p,u0,t0,ts,npp,nt,nc,tsmod,pmod,smod,@nodalf,1);
figure(4); clf; plot(ts(1,:), ts(2,:)); % point-vals
figure(5); clf; plot(ts(1,:), ts(3,:)); % difference in norm
set(gca,'FontSize',p.plot.fs); axis tight; %axis([0 10*p.hopf.T 0 1.3]);
xlabel('t'); ylabel('||u(t)-u_0||_{\infty}');

soln snapshots of time integration

dir='stab3'; si=0; incr=70; nt=1*npp/smod; wnr=2; cmp=2; pstyle=2;
ind=si:incr:11*incr; lay=[2 6]; notic=1;
tintplot2d(dir,ind,wnr,cmp,pstyle,lay,notic);

plot Hopf initial guesses

aux=[]; aux.tl=15; aux.lay=[1 3]; aux.pind=[1 4 7];
aux.xtics=[]; aux.ytics=[]; aux.cb=1; para=3;
p=hoswibra('tr','hpt2',0.1,para,'du1',aux); hoplot(p,1,1,aux);  pause
p=hoswibra('tr','hpt3',0.1,para,'du1',aux); hoplot(p,1,1,aux);
Problem directory name: du1
real(mu)=2.76482e-08, imag(mu)=0.966821
lam=-0.141407, om=0.966821,  NF-coeffis: dlam=1, alpha=19.2416
nat.parametr, lambda-guess=-0.0414069
Problem directory name: du1
real(mu)=1.90013e-08, imag(mu)=0.964578
lam=-0.0439291, om=0.964578,  NF-coeffis: dlam=1, alpha=18.4737
nat.parametr, lambda-guess=0.0560709

contour plots at Bif

close all; hospatplot('tr','hpt2',6,1,0);
lam=-0.141407, real(mu)=2.76482e-08, imag(mu)=0.966821

other plots at Bif

hospatplot('tr','hpt3',6,1,3);
lam=-0.0439291, real(mu)=1.90013e-08, imag(mu)=0.964578

make movie of last points on h2-h6:

p1=loadp('h1','pt10'); p2=loadp('h2','pt10'); p3=loadp('h3','pt10');
p4=loadp('h4','pt10'); p5=loadp('h5','pt10'); p6=loadp('h6','pt10');
cnr=1; wnr=4; figure(4); pause; mov=homovplot5(p2,p3,p4,p5,p6,cnr,wnr);
movie2avi(mov,'m5.avi');
% on linux: convert with  avconv -i m5.avi -q 10 -vf 'setpts=8*PTS' m5.ogv