Home > demos > schnakenberg > schnakinit.m

schnakinit

PURPOSE ^

init-routine with parameters:

SYNOPSIS ^

function p=schnakinit(p,m,n,nx,df)

DESCRIPTION ^

 init-routine with parameters: 
 spx=spatial period in x (in multiples of 2*pi/kc)
 spy=spatial period in y
 nx=#points in x-direction for regular mesh
 df=deformation factor (detune y direction to avoid multiple Bif)
    choose close to 1

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p=schnakinit(p,m,n,nx,df) 
0002 % init-routine with parameters:
0003 % spx=spatial period in x (in multiples of 2*pi/kc)
0004 % spy=spatial period in y
0005 % nx=#points in x-direction for regular mesh
0006 % df=deformation factor (detune y direction to avoid multiple Bif)
0007 %    choose close to 1
0008 p=stanparam(p);
0009 p.neq=2; p.f=@schnakf;p.jac=@schnakjac;p.cm=hot;
0010 p.outfu=@schnakbra; p.pstyle=2; kc=0.643594252905583;
0011 lx=m*2*pi/kc; ly=n*2*df*pi/sqrt(3)/kc; 
0012 [p.geo,p.bc]=recnbc2(lx,ly); p.bcf=@(p,u,lam) p.bc;
0013 ny=nx*round(ly/lx); p=stanmesh(p,nx,ny); p=setbmesh(p);
0014 p.lammin=0.8; p.lam=3.4;
0015 u=p.lam*ones(p.np,1); v=1/p.lam*ones(p.np,1); 
0016 u0=[u v]; p.u=reshape(u0,p.neq*p.np,1);
0017 p.xi=1/(p.neq*p.np);p.tau=1;

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