CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Looping over nodes of a cell (UDF) error (http://www.cfd-online.com/Forums/fluent/38744-looping-over-nodes-cell-udf-error.html)

Manoj November 27, 2005 10:03

Looping over nodes of a cell (UDF) error
 
hi, I have following EXECUTE_ON_DEMAND udf for post-processing. I would like to loop over nodes of certain cells in the domain. When I interpret this udf, the error comes "non-integer subscript expression: unsigned char" for the line containing "c_node_loop(c,t,n)". I would like to know why this error message is coming? Is there any other way of looping over nodes? Please let me know as soon as possible. Thanking you in advance.

#include "udf.h" DEFINE_ON_DEMAND(analysis) {

Domain *d;

Thread *t;

cell_t c;

Node *node;

int n;

real xc[ND_ND];

d = Get_Domain(1);

thread_loop_c(t,d)

{

begin_c_loop(c,t)

{

C_CENTROID(xc,c,t);

if(fabs(xc[2]-0.135)<0.0002)

{

c_node_loop(c,t,n)

{printf(" %d ",n);}

}

}

end_c_loop(c,t)

} }

RoM November 28, 2005 03:06

Re: Looping over nodes of a cell (UDF) error
 
I think you cant run this udf in interpreted mode. I compiled it with no error.

RoM

Manoj December 1, 2005 01:30

Re: Looping over nodes of a cell (UDF) error
 
Thanks. I got it.


All times are GMT -4. The time now is 11:56.