% SH-Equation with backward Euler (Crank Nicholson for alpha=0.5)  periodic boundary conditions

function sh

[nx,xmax,tmax,dt,alpha,mu,dx]=default;

ind=0;
while ind < 98

ind=input(' 0: compute 1: i.c. 2: nx,xmax,tmax,dt 3: mu 4: Eckhaus perturbation 99: quit ')

 if ind == 0

   [y,Y]=go(x,y,t,tmax,xmax,nx,dt,Dr,alpha,Dl);

 end

 if ind == 1

   [D0,D2,D4,Mt,Dl,Dr]=init(nx,dx,dt,mu,alpha);
   [t,x,y]=ic(nx,dx,xmax);

 end

 if ind == 2

  nx
  xmax
  tmax
  dt
  nx=input(' nx =');
  xmax=input(' xmax =');
  tmax=input(' tmax =');
  dt=input(' dt =');
  dx=xmax/nx;
  [D0,D2,D4,Mt,Dl,Dr]=init(nx,dx,dt,mu,alpha);


 end

 if ind == 3

  mu
  mu=input(' mu =');
  [D0,D2,D4,Mt,Dl,Dr]=init(nx,dx,dt,mu,alpha);

 end

 if ind == 4

  [y]=eckhaus(nx,dx,y);

 end

end
 
