|
[Sponsors] |
June 20, 2005, 14:35 |
UDF, Looping through threads or faces
|
#1 |
Guest
Posts: n/a
|
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 |
|
June 21, 2005, 02:24 |
Re: UDF, Looping through threads or faces
|
#2 |
Guest
Posts: n/a
|
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Loop over the faces of a cell in UDF | Anthony Wachs | Fluent UDF and Scheme Programming | 6 | April 2, 2024 11:10 |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
DEFINE_DPM_OUTPUT macro UDF HELP | Puneet | FLUENT | 3 | November 28, 2003 11:55 |