Home > demos > chemotax > cheminit.m

cheminit

PURPOSE ^

init-routine

SYNOPSIS ^

function p=cheminit(p)

DESCRIPTION ^

 init-routine

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p=cheminit(p) 
0002 % init-routine
0003 p=stanparam(p); p.pstyle=2; pre=sprintf('%s',inputname(1)); p=setfn(p,pre);
0004 p.neq=2; p.f=@chemf; p.jac=@chemjac; p.outfu=@chembra; 
0005 lx=0.5; ly=2; p.geo=rec(lx,ly); p=stanmesh(p,0.075); 
0006 bc=gnbc(p.neq,4,zeros(p.neq),zeros(p.neq,1)); p.bcf=@(p,u,lam) bc; 
0007 p.dsmin=0.00001; p.dlammax=0.5; p.nsteps=20; p.neig=min(50,p.np); 
0008 p.nsw=1; p.bisecmax=5; p.amod=0; p.bifchecksw=1; 
0009 p.pcomp=2; p.parasw=2; p.jsw=3;  % use numjac!
0010 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% starting point %%%%%%%%%%%%%%%%%%%%%%%%%%%%
0011 p.lam=17.5; p.lam=10; p.ds=0.1;
0012 p.dlammax=1; p.lammax=25; u=1*ones(p.np,1); v=0.5*ones(p.np,1); 
0013 u0=[u v]; p.u=reshape(u0,p.neq*p.np,1); 
0014 p.tau=zeros(p.neq*p.np+1,1); p.tau(1)=1; plotsol(p,p.pfig,1,p.pstyle);
0015 p.vol=triint(ones(p.np,1),p.points,p.tria); % needed in chembra
0016 p.xi=1/p.np; p.maxt=2*p.nt;
0017

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