non-integer subscript expression???
i have written this line in my udf:
nfc = C_NFACES(c,t); and i get this error while interpreting the *.c file: Error: C:\Fluent.Inc\MonEssai.c: line 37: non-integer subscript expression: unsigned char. what should i do. |
Hi,
Just obvious questions, but have you declared c, t and nfc properly? cell_t c; Thread *t; int nfc ; In what macro are you trying to use this? Cheers, Javier |
yes, i have declared, i write them in execute_at_end macro
|
Can you post your code or is too long?
Be careful to declare the domain, thread and also what type of thread are you going to loop. In general you must use this structure to access the data: DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *d; Thread *t; cell_t c; int nfc; d = Get_Domain(1); thread_loop_c(t,d) { if (FLUID_THREAD_P(t)) { begin_c_loop(c,t) nfc = C_NFACES(c,t); end_c_loop(c,t) } } } |
yes i found the problem, exactly the problem was that i had not used the above process for accessing the data,
THANK YOU for your cooperation |
Similar problem
Dear,
I have the same problem as described here. I found out that a similar error also occurs when calling C_FACE_LOOP instead of C_NFACES. Could you please provide us more details on your solution? Because when I implement this macro as described above by jallaron, the error is still there. Many thanks! |
Hi could you provide your implementation to check it out. Using C_FACE_LOOP also needs to declare a face thread and an integer variable which will store the local index face numbers.
Cheers, Javier |
Implementation
Thanks for taking a look at this. My implementation:
Code:
#include "udf.h" |
All times are GMT -4. The time now is 23:57. |