Home > demos > animalchem > animalinit.m

animalinit

PURPOSE ^

init-routine

SYNOPSIS ^

function p=animalinit(p)

DESCRIPTION ^

 init-routine

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p=animalinit(p) 
0002 % init-routine
0003 p=stanparam(p); p.pstyle=2; 
0004 p.neq=2; p.f=@chemf; p.outfu=@chembra; 
0005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% geometry data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0006 [p.geo,p.bc]=animalgeo(0.025); hmax=0.2; %hmax=0.15;
0007 p=stanmesh(p,hmax); p.bcf=@(p,u,lam) p.bc; p=setbmesh(p);
0008 p.dsmin=0.00001; p.dlammax=0.25; p.nsteps=50; p.neig=min(20,p.np); 
0009 p.jsw=3; p.nsw=1; p.bisecmax=5; p.amod=0; p.bifchecksw=1; p.pcomp=1; 
0010 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% starting point %%%%%%%%%%%%%%%%%%%%%%%%%%%%
0011 p.lam=11.8; p.dlammax=0.05; p.ds=0.05; u=1*ones(p.np,1); v=0.5*ones(p.np,1); 
0012 p.lammax=13; u0=[u v]; p.u=reshape(u0,p.neq*p.np,1); 
0013 p.tau=zeros(p.neq*p.np+1,1); p.tau(1)=1; %plotsol(p,p.pfig,1,p.pstyle);
0014 p.vol=triint(ones(p.np,1),p.points,p.tria); % needed in chembra
0015 p.xi=1/p.np; pre=sprintf('%s',inputname(1)); p=setfn(p,pre); p.cm='copper';

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