Contents

clear all; close all; format compact; clear classes;

init

ndim=2; dir='hom2d';
p=[]; lx=pi; nx=25; par=[0.75; 1; 0.1; -1; 1];
p=cGLinit(p,lx,nx,par,ndim); p=setfn(p,dir); p.nc.mu1=1;
p.sw.bifcheck=2; p.nc.neig=10; p.sol.ds=0.1; p.sol.dsmax=0.2; p=cont(p,20);
first res=0
Problem directory name: hom2d
step lambda      y-axis    residual iter meth   ds       #-EV 
   0 got first point with lam=0.75, res=0 
   - now lam=0.76
   1 got second point with lam=0.76, res=0 
   2    0.86004  0.000e+00 0.00e+00    0  nat    0.10000   0 
   3    1.00000  0.000e+00 0.00e+00    0  nat   -0.06009   0 
   4    1.06011  0.000e+00 0.00e+00    0  nat    0.20000   0 
   - 1 possible bif between 1.06011 and 1.46026, om=0
 mu_r=0.000103888, mu_i=-1 
   5  1.26136e+00 (HP, saved to hom2d/hpt1.mat) bisection steps 10, last ds 0.000195313
   6    1.46026  0.000e+00 0.00e+00    0  nat    0.40000   0 
   - 1 possible bif between 1.46026 and 1.86041, om=0
 mu_r=-0.199189, mu_i=-1   - no convergence
   7    1.86041  0.000e+00 0.00e+00    0  nat    0.40000   2 
   - 1 possible bif between 1.86041 and 2.6607, om=0
 mu_r=-0.000267582, mu_i=-1 
   8  2.03313e+00 (HP, saved to hom2d/hpt2.mat) bisection steps 10, last ds -0.000390625
   9    2.66070  0.000e+00 0.00e+00    0  nat    0.80000   4 
...

first 2 branches

para=4; ds=0.1; aux=[]; aux.tl=11; figure(2); clf;
for bnr=1:2
switch bnr
 case 1; p=hoswibra('hom2d','hpt1',ds,para,'2db1',aux); nsteps=15;
 case 2; p=hoswibra('hom2d','hpt2',ds,para,'2db2',aux); nsteps=10;
end
p.hopf.jac=1; p.nc.dsmax=0.4; p.hopf.xi=1e-3;
p.fuha.blss=@mbel; p.nc.mbw=2; p.hopf.ilss=0; % set to 0 if no ilupack
tic; p=cont(p,nsteps);  toc
end
Problem directory name: 2db1
real(mu)=0.000103888, imag(mu)=1
lam=1.26136, om=1,  NF-coeffis: dlam=-1, alpha=6.9282
arc.parametr, lambda-guess=1.26119
max|y-u0|=0.704542, res=0.00131438
step  lambda      y-axis       res    iter  ds         T        nT   

 poor solve in mbel, |r|=0.0115898, b(end)=1, iterating ...it=1, |r|=3.27938e-09
   1    1.25239    0.06336  2.535e-13  3    0.20000    6.50437   11    0.10251   -0.15369
   2    1.20003    0.17034  3.535e-09  2    0.20000    6.54242   11    0.27423   -0.34411
   3    1.12562    0.27235  6.045e-10  2    0.20000    6.61411   11    0.44019   -0.36455

 poor solve in mbel, |r|=0.00179215, b(end)=1, iterating ...it=1, |r|=6.27654e-12
   4    1.06865    0.37198  3.685e-10  2    0.20000    6.71828   11    0.58974   -0.16405

 poor solve in mbel, |r|=26.5507, b(end)=1, iterating ...it=3, |r|=5.73646e-05
   5    1.07177    0.47034  1.592e-13  3    0.20000    6.84675   11    0.65870    0.20657

 poor solve in mbel, |r|=0.146009, b(end)=1, iterating ...it=1, |r|=1.06393e-05
   6    1.14953    0.56193  8.976e-13  3    0.20000    6.97896   11    0.63635    0.54256
...

BD, L^2

bpcmp=9; figure(3); clf;
plotbraf('2db1','pt17',3,bpcmp,'cl','k');
plotbraf('2db2','pt11',3,bpcmp,'lab',10,'cl','b');
axis([1 2.6 0 1]); xlabel('r'); ylabel('||u||_*');

BD, T

bpcmp=6; figure(3); clf;
plotbraf('2db1','pt17',3,bpcmp,'cl','k');
plotbraf('2db2','pt11',3,bpcmp,'lab',10,'cl','b');
axis([1 2.3  6.33 7.5]); xlabel('r'); ylabel('T');

soln plot

aux=[];  aux.pstyle=3; aux.xtics=[-2 2]; aux.ytics=[-1 1];
hoplotf('2db2','pt10',1,1,aux);
lam=2.28492

stab-cmds

p=loadp('2db2','pt10'); hoplot(p,1,1); dir='stab2d';
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: stab2d

repeat if necessary ...

nt=400;
[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,:)); % ts-plot, 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 3]);
xlabel('t'); ylabel('||u(t)-u_0||_{\infty}');

soln plot

dir='stab2d'; si=0; incr=80; nt=1*npp/smod; wnr=2; cmp=1; pstyle=2;
ind=si:incr:5*incr; lay=[2 3]; notic=1;
tintplot2d(dir,ind,wnr,cmp,pstyle,lay,notic);

movie

p=loadp('2db2','pt11'); aux.xtics=[-2 2]; aux.ytics=[-1 1];
mov=homov2d(p,1,1,aux); movie2avi(mov,'mcGL2d.avi');
%  avconv -i mcGL2d.avi -q 10 -vf 'setpts=8*PTS' mcGL2d.ogv