CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

help with macros F_ID and C_ID

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2007, 08:27
Default help with macros F_ID and C_ID
  #1
Jack Martinez
Guest
 
Posts: n/a
Hello everyone

In my problem statement I am required to address specific cell and face element on a boundary. Please note I am addressing this issue for a parallel solver.

I found that in mem.h the Fluent.Inc has provided macros F_ID and C_ID to obtain the global face and cell id. I hope, in parallel solver the face id we obtain using these macros are equal to their index (face_t f) defined in serial solver. However, while using this macros in a very simple UDF, Fluent always give following error, "Segmentation Vioation"

The sample UDF is below

#include "udf.h"

DEFINE_ON_DEMAND("mydomain")

{

#if !RP_HOST

face_t f;

Thread *t;

Domain *d;

d=Get_Domain(1);

t=Lookup_Thread(d,4);

#if RP_NODE

if(I_AM_NODE_ZERO)

{

begin_f_loop(f,t)

{

Message0("\nThe face id is %d \n", F_ID(f,t));

}

end_f_loop(f,t)

}

#endif /* #if RP_NODE */

#endif /* #if !RP_HOST */

}

Look forward to hear yours expert opinion on this topic.

Regards Jack
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:30.