the error is in line n = C_UDSI_G ...the gradient has two components or three components .. x, y or x,y,z ... but "n" is defined as realmake it real n[ND_ND];

Thanks for your suggestions. I've made some modifications to the code, and was able to declare n as a vector using real n[ND_ND] and perform the corresponding operation using NV_V(n, =, C_UDSI_G(c,t,0)).nThe below are the concepts I'm struggling with right now.nncap is a vector that has the value ( n/NV_MAG(n) ), where n is also a vector. How would I perform the operation of dividing a vector by a scalar? As the command as it is gives me an error 'error C2296: '/': illegal, left operand has type 'real [2]'' Is there a NV macro that can handle this?nI need to calculate the divergence of the vector ncap (or simply said - the Laplacian) and store it in k. How would I go about this?n