my fault about UDF
Hi everyone, Could you please send me your points about my UDF file. I recieve an error about variable "n". #include "udf.h" "Error: adjust1.c: line 18: non-integer subscript expression: unsigned char." Regards,
DEFINE_ADJUST(unsteady_temperature, d) { float x1,y1; face_t f; cell_t c; Thread *t; int i,n; Node *v; i=0; begin_c_loop(c,t) { c_node_loop(c, t, n) { v = C_NODE(c,t,n); x1 = NODE_X(v) printf("faridd: %g\n",x1); } } end_c_loop(c,t) } |
Re: my fault about UDF
No #include udf.h" at the top
Use "real" instead of "float" or "double" Missing semicolon at end of line x1=NODE_X(v) Some udfs will not run in interpreted mode. If the interpreter still fails try to compile. RoM |
All times are GMT -4. The time now is 19:27. |