Home > demos > gpsol > gpdemo.m

gpdemo

PURPOSE ^

demoscript for Gross-Pitaevski;

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 demoscript for Gross-Pitaevski;

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % demoscript for Gross-Pitaevski;
0002 close all; clear all; 
0003 fprintf('gpinit: first define dummy starting guess on regular mesh,\n');
0004 fprintf('use meshref to generate fine mesh in middle of domain, \n');
0005 fprintf('and finally create starting guess on the finer mesh and use \n');
0006 mypause('meshref again to create starting point on suitable mesh');
0007 p=[];p=gpinit(p);
0008 mypause('now run continuation'); 
0009 p=cont(p);
0010 % ---------------------------------------------------------
0011 fprintf('Plot branch and some solutions in different plotstyles\n'); 
0012 mypause('see plotsol.m for the customized plotting');
0013 plotbra(p,3,3,'lab',[10,15]);
0014 plotsolf('p','p1',4,1,5); % VF plot
0015 plotsolf('p','p10',5,1,5); % VF plot
0016 plotsolf('p','p10',6,10,3); % amp plot
0017 plotsolf('p','p15',7,10,3); % amp plot
0018 plotsolf('p','p20',8,13,2); % phase plot
0019 % ---------------------------------------------------------
0020 mypause('vgpinit: proceed similar to gpinit to get starting point');
0021 q=[];q=vgpinit(q);
0022 mypause('Continuation with mesh-adaption every 3 steps:'); 
0023 q.amod=3;q=cont(q);
0024 % ---------------------------------------------------------
0025 mypause('plot p and q branch together, and some q solutions'); 
0026 clf(3);
0027 plotbra(p,3,3,'lab',[1,10,15]);
0028 plotbra(q,3,3,'lab',[1,10,15],'cl','r');
0029 xlabel('\omega'); ylabel('p=max|u|/max|v| and p_1');
0030 plotsolf('q','p1',10,1,5); % VF plot
0031 plotsolf('q','p10',11,1,5); % VF plot

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