Improving accuracy and robustness of a discrete direct differentiation method and discrete adjoint method for aerodynamic shape optimisation