Contents

clear all; close all; format compact; clear classes;
Warning: Objects of 'onCleanup' class exist.  Cannot clear this class or any of
its superclasses. 

init

ndim=2; dir='hom2d'; p=[]; nx=40;
Du=0.01; Dv=0.1; Dw=1; c=1; d=1; a=0.95; b=2.75; lx=pi/2;
par=[a b c d Du Dv Dw]; % a, b, c, d, Du, Dv, Dw
p=bruinit(p,lx,nx,par,ndim); p=setfn(p,dir); p.sol.ds=0.01; p.sol.dsmax=0.01;
p.sw.bifcheck=2; p.sol.ds=0.025; p.nc.dsmax=0.025; p.sw.spcalc=0;
p.nc.bisecmax=15; p.nc.mu2=0.5e-2; p.pm.mst=5; p.nc.ntot=50; p0=p;
inires=4.44089e-16
first res=4.44089e-16
Problem directory name: hom2d

init omv (guesses for imags of Eval-crossing)

p=p0; p=initwn(p,1,2); p=initeig(p,4); p.nc.neig=[3, 3];
setting om(2)=0.9375

cont

p=cont(p,30);
step lambda      y-axis    residual iter meth   ds       
   0 got first point with lam=2.75, res=4.44089e-16 
   - now lam=2.7525
   1 got second point with lam=2.7525, res=4.022e-16 
   2    2.77387    2.91986 3.88e-15    0  nat    0.02500 
   3    2.79523    2.94235 6.31e-12    0  nat    0.02500 
   4    2.81660    2.96484 8.94e-12    0  nat    0.02500 
   - 1 possible bif between 2.8166 and 2.83797, om=0.9375
 mu_r=2.55873e-07, mu_i=1.05961 
   5  2.81782e+00 (HP, saved to hom2d/hpt1.mat) bisection steps 15, last ds 3.8147e-07
   - also saved to hom2d/pt5.mat
   6    2.83797    2.98733 7.74e-12    0  nat    0.02500 
   - 1 possible bif between 2.83797 and 2.85933, om=0.9375
 mu_r=0.00585037, mu_i=0.925839   - no convergence
   7    2.85933    3.00983 8.37e-12    0  nat    0.02500 
   - 1 possible bif between 2.85933 and 2.8807, om=0.9375
 mu_r=-0.00453233, mu_i=0.926111 
   8  2.85934e+00 (HP, saved to hom2d/hpt2.mat) bisection steps 15, last ds -3.8147e-07
   9    2.88070    3.03232 7.20e-12    0  nat    0.02500 
  10    2.90207    3.05481 1.09e-11    0  nat    0.02500 
...

Bif from HPs, h1

para=4; ds=0.1; dsmax=0.5; aux=[]; aux.tl=11;% aux.al=1;
p=hoswibra('hom2d','hpt1',ds,para,'2dh1',aux);
p.nc.mbw=2; p.fuha.blss=@mbel; p.hopf.ilss=0; p.hopf.xi=1e-2;
p.nc.dsmax=dsmax; p.sw.verb=2; tic; p=cont(p,10); toc
Problem directory name: 2dh1
real(mu)=2.55873e-07, imag(mu)=1.05961
lam=2.81782, om=1.05961,  NF-coeffis: dlam=1, alpha=19.8728
arc.parametr, lambda-guess=2.81791
max|y-u0|=0.670331, res=0.00684696
step  lambda      y-axis       res    iter  ds         T        nT   
   1    2.81790    2.98415  1.675e-09  5    0.10000    6.13285   11    0.00018    0.00088
   2    2.81896    3.03657  6.780e-09  2    0.20000    6.13306   11    0.00160    0.00790
   3    2.82109    3.08652  1.257e-11  2    0.40000    6.13349   11    0.00271    0.01331
   4    2.82863    3.18556  3.821e-10  2    0.40000    6.13504   11    0.00494    0.02383
   5    2.84036    3.28512  1.605e-09  2    0.40000    6.13751   11    0.00715    0.03357
   6    2.85613    3.38542  6.313e-09  2    0.40000    6.14092   11    0.00932    0.04243
   7    2.87564    3.48562  8.660e-15  3    0.40000    6.14527   11    0.01138    0.05027
   8    2.89845    3.58482  5.351e-14  3    0.40000    6.15050   11    0.01325    0.05706
   9    2.92402    3.68223  4.943e-14  3    0.40000    6.15647   11    0.01480    0.06282
  10    2.95179    3.77730  7.232e-14  3    0.40000    6.16298   11    0.01591    0.06764
Elapsed time is 106.680013 seconds.

Bif from BPs

p=swibra('hom2d','bpt1','2ds1',0.01); p.sw.spcalc=1;
p.sol.dsmax=0.1; p.nc.ntot=20; p=pmcont(p);
lambda=2.91193, zero eigenvalue is -8.0532e-10
trivial swibra
Problem directory name: 2ds1
step lambda      y-axis    residual iter meth   ds       #-EV 
multi continuation step 1
   1    2.90211    3.06903 2.44e-09    3  arc    0.01000   1   2 
   - 1 possible bif between 2.90211 and 2.87921, om=0
 mu_r=0.0110718, mu_i=0   - no convergence
   2    2.87921    3.05534 3.26e-11    4  arc    0.02000   1   2 
   - 1 possible bif between 2.87921 and 2.849, om=0
 mu_r=-7.27079e-07, mu_i=0 
   3  2.87208e+00 (BP, saved to 2ds1/bpt1.mat) bisection steps 15, last ds -1.52588e-07
   4    2.84900    3.03196 2.65e-09    4  arc    0.03000   1   2 
   - 2 possible bif between 2.849 and 2.81972, om=0,0.9375
 mu_r=-7.87956e-07, mu_i=0 
   5  2.83603e+00 (BP, saved to 2ds1/bpt2.mat) bisection steps 15, last ds -1.52588e-07
   - also saved to 2ds1/pt5.mat
 mu_r=5.00144e-06, mu_i=0.916816 
   6  2.83897e+00 (HP, saved to 2ds1/hpt1.mat) bisection steps 7, last ds 5.96046e-10
   7    2.81972    3.00720 3.93e-10    4  arc    0.04000   1   1 
...

2ndary Bifs

aux=[]; aux.tl=11; ds=0.1;
p=hoswibra('2ds1','hpt2',ds,para,'2ds1h2',aux); p.hopf.xi=1e-3; p.file.smod=1;
p.nc.dsmax=0.1; p.sw.verb=2;p.nc.mbw=2; p.fuha.blss=@mbel; p.hopf.ilss=0;
tic; p=cont(p,5); toc
Problem directory name: 2ds1h2
real(mu)=-0.00299412, imag(mu)=1.04719
lam=2.81972, om=1.04719,  NF-coeffis: dlam=1, alpha=19.072
arc.parametr, lambda-guess=2.81981
max|y-u0|=0.744002, res=0.00833061
step  lambda      y-axis       res    iter  ds         T        nT   

 poor solve in mbel, |r|=0.0657236, b(end)=1, iterating ...it=1, |r|=1.52083e-05
   1    2.81452    3.07922  1.452e-11  7    0.10000    6.21445   11    0.03222    0.02698
   2    2.81864    3.15265  3.482e-09  2    0.10000    6.21923   11    0.06033    0.05348
   3    2.82531    3.22637  7.424e-09  2    0.10000    6.22644   11    0.08016    0.07742
   4    2.83441    3.29975  7.021e-11  3    0.10000    6.23520   11    0.08482    0.09772

honloopext: damp alpha=0.25, res=0.000236557, ds=0.1
      stepsizecontrol: res=6.84526e-05, reducing ds to 0.05

honloopext: damp alpha=0.25, res=0.000693313, ds=0.05
      stepsizecontrol: res=1.4751e-05, reducing ds to 0.025
   5    2.83727    3.32136  2.949e-10  3    0.05000    6.23748   11    0.06323    0.09534
Elapsed time is 85.794633 seconds.

plot BD, L^2

bpcmp=9; wnr=3; figure(wnr); clf
plotbraf('hom2d','pt20',3,bpcmp,'cl','k','lwst',2);
plotbraf('2dh1','pt10',3,bpcmp,'cl','r','lwst',2, 'lab',5);
plotbraf('2ds1','pt20',3,bpcmp,'cl','b','lwst',2);
plotbraf('2ds1h2','pt5',3,bpcmp,'cl','m', 'lab',[5],'lwst',2);
xlabel('b'); ylabel('||u||_*');
axis([2.75 2.95 2.9 3.4]); set(gca,'XTick',[2.8 2.9]);

plot solns

plotsolf('2ds1','hpt2',1,1,2); axis image; set(gca,'YTick',[-0.2 0.2]);
lam=2.81972

plot hopf-solns

hoplotbruf('2dh1','pt5',4,1); pause
hoplotbruf('2ds1h2','pt2',4,1); pause
hoplotbruf('2ds1h2','pt5',4,1);
lam=2.84036
lam=2.81864
lam=2.83727

stab-cmds

p=loadp('2ds1h2','pt5'); hoplot(p,1,1); dir='stab1';
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=50; nt=200; pmod=50; smod=5; tsmod=1; nc=0;
Problem directory name: stab1

tint

nt=400;
[p,t0,ts,nc]=hotintxs(p,u0,t0,ts,npp,nt,nc,tsmod,pmod,smod,@nodalf,1);

plot time-series

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 plot

dir='stab1'; si=0; incr=50; nt=1*npp/smod; wnr=2; cmp=1; pstyle=2;
ind=si:incr:7*incr; lay=[4 2]; notic=1;
tintplot2d(dir,ind,wnr,cmp,pstyle,lay,notic);

movie

p=loadp('2ds1h2','pt5');  mov=homov(p,1,1); movie2avi(mov,'m1.avi');
% avconv -i m1.avi -q 10 -vf 'setpts=8*PTS' m1.ogv
Published with MATLAB® R2013a