Minor modification (double[u] ---> vec3d)