function du=adv(u,t)
  n=length(u);
  dx=2*pi/n;
  du=u;
  for k=2:n-1
    du(k)=(u(k-1)-u(k+1))/(2*dx);
  end
  du(1)=(u(n)-u(2))/(2*dx);  
  du(n)=(u(n-1)-u(1))/(2*dx);
