Home > demos > schnakenberg > schnak11cmds.m

schnak11cmds

PURPOSE ^

command templates for Schnakenberg on a small domain; run cell-by-cell;

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 command templates for Schnakenberg on a small domain; run cell-by-cell;

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % command templates for Schnakenberg on a small domain; run cell-by-cell;
0002 clear all; f=[]; 
0003 spx=1; spy=1; nx=30; % 1 spot in x direction and 1 spot in y direction
0004 df=0.97; % deformation factor
0005 f=schnakinit(f,spx,spy,nx,df);
0006 f.parasw=2;f.bifchecksw=2;f.dsmin=0.01;f.ds=-0.1;f.nsteps=1; f.lammin=1.5; 
0007 f=cont(f); % 1 initial step
0008 f=findbif(f,1); % find 1st and 2nd bifurcation from homogen.branch
0009 f=findbif(f,1);
0010 %% cold hexagons
0011 c=swibra('f','bp2','c', 0.08);  
0012 % suitable parameters for first step
0013 c.dsmin=0.08;c.bifchecksw=0;c.mst=1;c.amod=1;c=pmcont(c); 
0014 % suitable parameters for further steps
0015 c.ds=0.1;c.dsmin=0.1;c.mst=10;c.imax=10;c.nsteps=100;c=pmcont(c);
0016 %% hot hexagons
0017 load('c/p2');h=p;h=setfn(h);h.ds=-h.ds; % load a cold hexagon point and flip direction
0018 h.mst=2;h.dsmin=abs(h.ds);h.nsteps=2;h=pmcont(h);
0019 % suitable parameters for further cont:
0020 h.resfac=1E-7; % needed to avoid branch-switching!
0021 h.ds=-0.1;h.dsmin=0.1;h.mst=10;h.nsteps=100;
0022 h=pmcont(h);
0023 %% up-stripes
0024 s=swibra('f','bp1','s', 0.01); 
0025 s.amod=1;s.nsteps=1;s.bifchecksw=2;s=pmcont(s);
0026 s.ds=0.1; s.nsteps=200; s=pmcont(s);
0027 %% down-stripes
0028 ss=swibra('f','bp1','ss', -0.01); ss.amod=1;
0029 ss.nsteps=1; ss.bifchecksw=2; ss=pmcont(ss);
0030 ss.ds=-0.1;  ss.dsmax=0.1;ss.nsteps=20; ss.lammin=1.5; ss=pmcont(ss);
0031 %% cold beans
0032 b=swibra('s','bp2','b',0.05);
0033 b.amod=1;b.mst=4;b.dsmin=0.05;b.nsteps=4;b=pmcont(b);
0034 %% hot beans
0035 bb=swibra('ss','bp2','bb',0.05);
0036 bb.amod=1;bb.mst=4;bb.dsmin=0.05;bb.nsteps=4;bb=pmcont(bb);
0037 %% further continue the homogen branch
0038 f.nsteps=20; f=cont(f);
0039 %% bifurcation diagram
0040 figure(5); clf; ms=10; 
0041 plotbraf('s','p29',5,2,'ms',ms,'lw',3,'cl',[0 0.4 0],'lab',30); 
0042 plotbraf('b','p10',5,2,'ms',ms,'lw',3,'cl',[0.7 0 0.3],'lp',9,'lab',5); 
0043 plotbraf('c','p26',5,2,'ms',ms,'lw',3, 'cl',[0 0 1],'lab',25); 
0044 plotbraf('ss','p41',5,1,'ms',ms,'lw',3, 'cl',[0 0.3 0],'lab',50); 
0045 plotbraf('h','p28',5,1,'ms',ms,'lw',3, 'cl',[0.7 0 0],'lab',30); 
0046 plotbraf('bb','p17',5,1,'ms',ms,'lw',3, 'cl',[0.3 0 0.7],'lp',14,'lab',10); 
0047 plotbraf('f','p13',5,1,'ms',ms,'lw',3, 'cl',[0 0 0]);
0048 text(1.5,6,'h','Fontsize',20,'color',[0.7 0 0]);
0049 text(2.4,5.2,'bb','Fontsize',20,'color',[0.3 0 0.7]);
0050 text(1.4,3.7,'ss','Fontsize',20,'color',[0 0.3 0]);
0051 text(2.5,1.2,'s','Fontsize',20,'color',[0 0.4 0]);
0052 text(2.5,0.5,'c','Fontsize',20,'color',[0 0 1]);
0053 text(3.25,2.0,'b','Fontsize',20,'color',[0.7 0 0.3]);
0054 text(2,2.3,'f','Fontsize',20,'color',[0 0 0]);
0055 %% plot of some solutions
0056 plotsolf('s','p29',4,1,2);
0057 plotsolf('b','p5',5,1,2);
0058 plotsolf('c','p25',6,1,2);
0059 plotsolf('ss','p41',7,1,2);
0060 plotsolf('h','p28',8,1,2);
0061 plotsolf('bb','p10',9,1,2);
0062 
0063 
0064

Generated on Wed 15-Aug-2012 12:53:02 by m2html © 2005