UDF, Looping through threads or faces
Suppose I saved a UDM (User Defined Memory) variable in each face. Then I loop over the threads and faces to find the minimal of that variable: thread_loop_f(t, domain) {
begin_f_loop(f, t) { /* find and record the thread and face where the minimal exists */ tt = t; ff = f; } end_f_loop(f,t) } Here tt and ff are the same type as t and f, respectively. I am trying to use tt and ff to record the interested face and want to use them out of the loop. But it did not work. Is it because that "Thread *" and "face_t" are not like Integer of Real and they can not be assigned to another variable directly? Anybody has done similar thing and any suggestion? Thanks, Zhang |
Re: UDF, Looping through threads or faces
Can you do what you want within the loop using the "if........else"? I have not faced such problems. Can user define a global variables in UDF or just a UDF "global" variables.? I'm interesting in it. Could you email to me and tell me something detail?
Joey |
All times are GMT -4. The time now is 21:53. |