|
[Sponsors] |
April 4, 2003, 04:34 |
UDF int id;
|
#1 |
Guest
Posts: n/a
|
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! |
|
April 4, 2003, 09:29 |
Re: UDF int id;
|
#2 |
Guest
Posts: n/a
|
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? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] ParaView/Parafoam error when making animation | Disco_Caine | ParaView | 6 | September 28, 2010 09:54 |
OpenFOAM-1.5-dev svn revision 1438: libOpenFOAM does not compile in SP | 4xF | OpenFOAM Bugs | 3 | October 16, 2009 05:35 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 09:38 |