|
[Sponsors] |
August 26, 2009, 02:07 |
non-integer subscript expression???
|
#1 |
Member
MOHSEN Zendehbad
Join Date: Aug 2009
Posts: 35
Rep Power: 17 |
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. |
|
August 26, 2009, 02:41 |
|
#3 |
Member
MOHSEN Zendehbad
Join Date: Aug 2009
Posts: 35
Rep Power: 17 |
yes, i have declared, i write them in execute_at_end macro
|
|
August 26, 2009, 20:26 |
|
#4 |
New Member
|
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) } } } |
|
August 29, 2009, 02:01 |
|
#5 |
Member
MOHSEN Zendehbad
Join Date: Aug 2009
Posts: 35
Rep Power: 17 |
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 |
|
August 4, 2010, 06:38 |
Similar problem
|
#6 |
New Member
Join Date: Oct 2009
Posts: 3
Rep Power: 17 |
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! |
|
August 4, 2010, 09:04 |
|
#7 |
New Member
|
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 |
|
August 4, 2010, 09:16 |
Implementation
|
#8 |
New Member
Join Date: Oct 2009
Posts: 3
Rep Power: 17 |
Thanks for taking a look at this. My implementation:
Code:
#include "udf.h" DEFINE_ON_DEMAND(test1) { Domain *d; Thread *t; cell_t c; int count = 0; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) count = C_NFACES(c,t); printf("%i",count); end_c_loop(c,t) } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble Using Pressure In Expression For BC | Nolan | CFX | 4 | June 23, 2008 17:10 |
Writing an expression for fully developed flow! | Usman | CFX | 12 | December 20, 2007 12:26 |
Relief Plots in CFX | Michael | CFX | 15 | June 30, 2006 09:01 |
Lift, Drag Vs time chart,calculations | Jamesd69climber | CFX | 8 | February 17, 2005 18:23 |
Creating, loop or iteration using expression edito | Jan | CFX | 3 | July 28, 2003 12:01 |