|
[Sponsors] |
February 3, 2006, 06:02 |
About DEFINE_ADJUST
|
#1 |
Guest
Posts: n/a
|
Hello. I'm beginner in UDF. My first example is DEFINE_ADJUST .The source code can interprete but when i'm hooking in User define function hooks. then it is not work. Does anybody know what is it going on ??
Thank you very much sagga This is the source code #include "udf.h" DEFINE_ADJUST(my_adjust, d) { Thread *t; /* Integrate dissipation. */ real sum_diss=0.; cell_t c; thread_loop_c (t,d) { begin_c_loop (c,t) sum_diss += C_D(c,t)* C_VOLUME(c,t); end_c_loop (c,t) } printf("Volume integral of turbulent dissipation: %g\n", sum_diss); } |
|
February 3, 2006, 10:49 |
Re: About DEFINE_ADJUST
|
#2 |
Guest
Posts: n/a
|
Output from solver to cortex is buffered and you printf probably gets stuck in the message buffer. Until fluent solver decides to flush the buffer you wont see your message. Workaround is to use "Message" instead of "printf" but this will not work in interpreted mode so you will have to compile your udf.
RoM |
|
|
|