Automatic mesh adaptation using the continuous adjoint approach and the spectral difference method