UDF int id;
I wrote a UDF for excercise.
#include "udf.h" DEFINE_ON_DEMAND(my_udf) { Domain *domain; domain=Get_Domain(3); int id; Thread *f_thread=Lookup_Thread(domain, id); } Once I interrepted it in FLUENT, it told me the syntax error on "int id;". I am confused! Is my UDF right or not? Is it required any other condition to define an integer index? Thanks in advance! |
Re: UDF int id;
i resolved this problem by myself, though I don't know why.
Change the sequence of the lines and divide the assignment line for thread into two parts as follows: #include "udf.h" DEFINE_ON_DEMAND(my_udf) { int idŁ»Thread *f_thread;Domain *domain; domain=Get_Domain(3); f_thread=Lookup_Thread(domain, id); } UDF can be compiled by FLUENT. Very confused. Anyone can tell me why? |
All times are GMT -4. The time now is 12:52. |