2d pseudospectral method code