CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How can I access THREAD_NAME(t)? (https://www.cfd-online.com/Forums/fluent-udf/88963-how-can-i-access-thread_name-t.html)

ahchoo May 31, 2011 08:53

How can I access THREAD_NAME(t)?
 
Hi
In UDF, how can I access THREAD_NAME(t)?

I can access THERAD_ID(t) by using a integer variable.
for example,

int ID = THREAD_ID(t);

But, if i utilize THREAD_NAME(t) like

char *zone_name = THREAD_NAME(t);
printf("%s", zone_name);

I only have a massage "(null)", even though it is compiled.

It will be good for me, if i can get zone name.
please.

gearboy May 31, 2011 22:39

Quote:

Originally Posted by ahchoo (Post 309950)
Hi
In UDF, how can I access THREAD_NAME(t)?

I can access THERAD_ID(t) by using a integer variable.
for example,

int ID = THREAD_ID(t);

But, if i utilize THREAD_NAME(t) like

char *zone_name = THREAD_NAME(t);
printf("%s", zone_name);

I only have a massage "(null)", even though it is compiled.

It will be good for me, if i can get zone name.
please.

You can't access thread name using THREAD_NAME in Fluent6.3. However, the macro is valid in Fluent 12.1. If you use fluent 6.3, you must use scheme technology to access thread name.


All times are GMT -4. The time now is 18:16.