
function d2ydx2 = dderiv(u, k)
% DDERIV calculates the second derivative in Fourier space
  d2ydx2 = real(ifft(-(k.^2).*fft(u)));
end
