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

Looping over nodes of a cell (UDF) error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2005, 10:03
Default Looping over nodes of a cell (UDF) error
  #1
Manoj
Guest
 
Posts: n/a
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)

} }
  Reply With Quote

Old   November 28, 2005, 03:06
Default Re: Looping over nodes of a cell (UDF) error
  #2
RoM
Guest
 
Posts: n/a
I think you cant run this udf in interpreted mode. I compiled it with no error.

RoM
  Reply With Quote

Old   December 1, 2005, 01:30
Default Re: Looping over nodes of a cell (UDF) error
  #3
Manoj
Guest
 
Posts: n/a
Thanks. I got it.
  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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 08:43
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
user defined function cfduser CFX 0 April 29, 2006 11:58
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 20:54.