Home > demos > achex > ac6demo.m

ac6demo

PURPOSE ^

demoscript for AC over hexagon

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 demoscript for AC over hexagon

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % demoscript for AC over hexagon
0002 close all; clear all; 
0003 mypause('Initialize and continue Allen-Cahn with x-dependent b.c.'); 
0004 p=[];p=ac6init(p);p.nsteps=40;
0005 mypause('Continuation starting at zero'); 
0006 p=cont(p); 
0007 mypause('Switch branches at bifurcation points and continue'); 
0008 q=swibra('p','bp1','q',-0.1);q=cont(q);
0009 r1=swibra('p','bp2','r1',-0.1);r1=cont(r1);
0010 r2=loadp('r1','p1','r2'); r2.ds=-r1.ds; r2=cont(r2);
0011 % ---------------------------------------
0012 mypause('Plot bifurcation diagram'); 
0013 figure(3);clf; cmp=2; 
0014 plotbra(p,3,cmp,'ms',8,'lw',4,'cl','b','lab',40); 
0015 plotbra(q,3,cmp,'ms',8,'lab',10,'lw',4);
0016 plotbra(r1,3,cmp,'ms',8,'lw',4,'cl','r');
0017 plotbra(r2,3,cmp,'ms',8,'lw',4,'cl','r');
0018 xlabel('\lambda');ylabel('||u||_2');
0019 mypause('Plot zoom of bifurcation diagram'); 
0020 figure(4);clf(4); cmp=1; 
0021 plotbra(p,4,cmp,'ms',8,'lab',10,'lw',4, 'cl', 'b');
0022 plotbra(r1,4,cmp,'ms',8,'lab',5,'lw',4,'cl','r');
0023 plotbra(r2,4,cmp,'ms',8,'lab',5,'lw',4,'cl','r');
0024 axis([0.8 1.5 1.1 1.4]);
0025 xlabel('\lambda');ylabel('max(u)');
0026 mypause('Plot some solutions from file'); 
0027 plotsolf('p','p1',5,1,4);
0028 plotsolf('q','p10',6,1,1);view(-20,60);
0029 plotsolf('p','p20',7,1,1); view(-20,60);
0030 % ----------------------------------------
0031 mypause('Initialize and continue Allen-Cahn with homogeneous b.c.'); 
0032 close all;clear all;
0033 ph=[];ph=ac6init(ph);ph.bcf=@ac6bcf;ph=cont(ph);

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