Home > demos > chemotax > chemdemo.m

chemdemo

PURPOSE ^

demo script for chemotaxis

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 demo script for chemotaxis

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % demo script for chemotaxis
0002 close all; clear all; 
0003 mypause('trivial branch:')
0004 p=[]; p=cheminit(p); p=cont(p); 
0005 % ------------------------------------------
0006 mypause('the first 5 bifurcating branches:'); 
0007 q1=swibra('p','bp1','q1',-0.2);
0008 q1.tol=1e-6; % run with rather large tol since sensitive and expensive
0009 q1.bifchecksw=0; q1.spcalcsw=0; q1=cont(q1); 
0010 q2=swibra('p','bp2','q2',0.2);q2.tol=1e-6; 
0011 q2.bifchecksw=0; q2.spcalcsw=0; q2=cont(q2);
0012 q3=swibra('p','bp3','q3',0.5);q3.tol=1e-6; 
0013 q3.bifchecksw=0; q3.spcalcsw=0; q3=cont(q3);
0014 q4=swibra('p','bp4','q4',0.1);q4.tol=1e-6; 
0015 q4.bifchecksw=0; q4.spcalcsw=0; q4=cont(q4);
0016 q5=swibra('p','bp5','q5',-0.1);q5.tol=1e-8; 
0017 q5.bifchecksw=0; q5.spcalcsw=0; q5=cont(q5);
0018 % ------------------------------------------
0019 mypause('plot bifurcation diagram'); 
0020 figure(4);clf(4);cmp=1;
0021 plotbra(p,4,cmp,'ms',10,'lw',4,'cl','b');
0022 plotbra(q1,4,cmp,'ms',10,'lw',4);
0023 plotbra(q2,4,cmp,'ms',10,'lw',4);
0024 plotbra(q3,4,cmp,'ms',10,'lw',4);
0025 plotbra(q4,4,cmp,'ms',10,'lw',4,'lab',[10,25],'cl','r');
0026 plotbra(q5,4,cmp,'ms',10,'lw',4);
0027 axis([10 22 0 0.8]);xlabel('\lambda');ylabel('||u_1-1||_{L^1}/|\Omega|');
0028

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