Gradient Vector Computation for Scalar Fields - Coding problem | OneNoughtOne