Contents

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

init and find HBPs

ndim=3; dir='hom3d'; p=[]; lx=pi; nx=20;
par=[5; 1; 0.1; -1; 1]; %  r  nu  mu   c3  c5
p=cGLinit(p,lx,nx,par,ndim); p=setfn(p,dir); p.sw.bifcheck=2;
p.nc.mu1=0.5; p.nc.neig=10; p=cont(p,20);
first res=0
Problem directory name: hom3d
step lambda      y-axis    residual iter meth   ds       #-EV 
   0 got first point with lam=5, res=0 
   - now lam=5.01
   1 got second point with lam=5.01, res=0 
   2    5.11001  0.000e+00 0.00e+00    0  nat    0.10000   0 
   3    5.31003  0.000e+00 0.00e+00    0  nat    0.20000   0 
   - 1 possible bif between 5.31003 and 5.71006, om=0
 mu_r=0.000321923, mu_i=-1 
   4  5.70030e+00 (HP, saved to hom3d/hpt1.mat) bisection steps 10, last ds 0.000195313
   5    5.71006  0.000e+00 0.00e+00    0  nat    0.40000   0 
   - 1 possible bif between 5.71006 and 6.1101, om=0
 mu_r=-0.00983524, mu_i=-1   - no convergence
   6    6.11010  0.000e+00 0.00e+00    0  nat    0.40000   2 
   - 1 possible bif between 6.1101 and 6.91017, om=0
 mu_r=-0.000687475, mu_i=-1 
   7  6.57655e+00 (HP, saved to hom3d/hpt2.mat) bisection steps 10, last ds -0.000390625
   8    6.91017  0.000e+00 0.00e+00    0  nat    0.80000   4 
   9    7.71024  0.000e+00 0.00e+00    0  nat    0.80000   4 
...

hoswibra and cont of Hopf branches

para=4; ds=0.1; aux=[]; aux.tl=11; figure(2); clf;
for bnr=1:2
switch bnr
 case 1; p=hoswibra('hom3d','hpt1',ds,para,'3db1',aux);
 case 2; p=hoswibra('hom3d','hpt2',ds,para,'3db2',aux);
end
p.hopf.jac=1; p.nc.dsmax=0.5; p.hopf.xi=5e-3; p.file.smod=5;
p.fuha.blss=@mbel; p.nc.mbw=2; p.hopf.ilss=0; % set to 0 if no ilupack
t1=tic; p=cont(p,10); toc(t1)
end
Problem directory name: 3db1
real(mu)=0.000321923, imag(mu)=1
lam=5.7003, om=1,  NF-coeffis: dlam=-1, alpha=13.2968
arc.parametr, lambda-guess=5.70012
max|y-u0|=1.04754, res=0.00094573
step  lambda      y-axis       res    iter  ds         T        nT   
   1    5.70058    0.00468  7.905e-10  3    0.20000    6.49842   11    0.00204   -0.00315

 poor solve in mbel, |r|=127.377, b(end)=1, iterating ...it=4, |r|=3.88429e-05
   2    5.69750    0.04122  1.943e-11  2    0.40000    6.50043   11    0.01804   -0.02750

 poor solve in mbel, |r|=0.679438, b(end)=1, iterating ...it=1, |r|=5.17443e-05
   3    5.67730    0.11426  5.801e-11  2    0.40000    6.51413   11    0.05062   -0.07217

 poor solve in mbel, |r|=1.05938, b(end)=1, iterating ...it=1, |r|=1.07788e-05
   4    5.64137    0.18712  2.517e-10  2    0.40000    6.54113   11    0.08463   -0.10470

 poor solve in mbel, |r|=14.1438, b(end)=1, iterating ...it=2, |r|=2.27478e-06
   5    5.59637    0.25978  4.462e-10  2    0.40000    6.58206   11    0.12021   -0.11589

...

plot BD, L^2

bpcmp=9; figure(3); clf;
plotbraf('3db1','pt10',3,bpcmp);
plotbraf('3db2','pt10',3,bpcmp,'lab',10, 'cl','b');
axis([5.5 7 0 0.8]); xlabel('r'); ylabel('||u||_*');

plot BD, T

bpcmp=6; pstyle=3; figure(3); clf;
plotbraf('3db1','pt10',3,bpcmp);
plotbraf('3db2','pt10',3,bpcmp,'lab',10, 'cl','b');
axis([5.5 7 6.4 7.2]); xlabel('r'); ylabel('T');

soln plot with custom layout (slice-plot at t=0, T/2)

aux=[]; aux.lay=[1 2]; aux.pind=[1 6]; aux.pstyle=1; % slice-plot
aux.ztics=[-0.5 0.5]; hoplotf('3db2','pt10',1,1,aux);
lam=8.48476

isoplot

aux.pstyle=2; hoplotf('3db2','pt10',1,1,aux);
lam=8.48476

movie

p=loadp('3db2','pt10'); mov=homov3d(p,1,1,aux);
movie2avi(mov,'mcGL3d.avi');