Problem ND_SET
Hi
I need help!!! I need create a vector in 2D from to the cordenates x and y. I have the x component, tx_l, and the y component, ty_l. I tried with the follow UDF: real tx_l, ty_l; real t_l [ND_ND] tx_l = mu_l*C_DUDX(cell,thread_l)*C_UDSI_G(cell,thread_l, 0)[0] + 0.5*mu_l*C_UDSI_G(cell,thread_l,0)[1]*(C_DUDY(cell,thread_l) + C_DVDX(cell,thread_l)); ty_l = mu_l*C_DVDY(cell,thread_l)*C_UDSI_G(cell,thread_l, 0)[1] + 0.5*mu_l*C_UDSI_G(cell,thread_l,0)[0]*(C_DUDY(cell,thread_l) + C_DVDX(cell,thread_l)); ND_SET(t_l[0], t_l[1], tx_l, ty_l) But this not works. The error is: error: macro "ND_SET" requires 6 arguments, but only 4 given Also I tried with: t_l[0] = tx_l; t_l[1] = ty_l; In this case gave no error, but I'm not sure if well. Anyone knows, how create a vector using the ND_SET macro in this case, which I have the components? Thanks!!! |
ND_SET requires 6 arguments no matter what the value of ND_ND is. you have to write something like
ND_SET(t_l[0], t_l[1], NULL, tx_l, ty_l, NULL) because the 3rd and 6th arguments must appear but are not used if ND_ND is 2. It is ok you assign the value for t_I array directly, which is almost the same as what the macro ND_SET does. |
Thank you very much for your reply.
Quote:
|
Quote:
|
All times are GMT -4. The time now is 19:30. |