Profile for mass - UDF error
Get the error
invalid type for integral binary expression: double ^ int when I try to interpret the following UDF #include "udf.h" DEFINE_PROFILE(mass_flow,thread,index) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[2]; F_PROFILE(f,thread,index)=35-((-0.75*(34.44-32.78)*y^2)+(1.75*(34.44-32.78)*y)+32.78); } end_f_loop(f,thread) } What could be the reason regards Luke |
The error was using the operator ^ as in y^2
So switched to y*y and it works !! Regards Luke |
Hi,
try y^2. (with dot) instead of y^2 even the command pow(y,2.) should be fine :) Best regards |
All times are GMT -4. The time now is 02:24. |