CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ANSYS (http://www.cfd-online.com/Forums/ansys/)
-   -   NODE_POS_NEED_UPDATE not working (http://www.cfd-online.com/Forums/ansys/97313-node_pos_need_update-not-working.html)

Vitaly February 14, 2012 12:06

NODE_POS_NEED_UPDATE not working
 
Hello,

I am writing a simple UDF to loop over an inlet face and report the coordinates of the nodes. This is my code:

thread_loop_f(t,d)
{
begin_f_loop(f,t)
{
f_node_loop(f,t,node)
{
nd = F_NODE(f,t,node);


if (NODE_POS_NEED_UPDATE(nd))
{
NODE_POS_UPDATED(nd);

cord_x = NODE_X(nd);
cord_y = NODE_Y(nd);
cord_z = NODE_Z(nd);

fprintf(out,"%i %g %g %g\n",nd,cord_x,cord_y,cord_z);
}


}
}
end_f_loop(f,t)
}
fclose(out);

If I include the 'if' statement, my output file is blank.
Does anyone know if I am using the NODE_POS_NEED_UPDATE correctly?

Thanks,

Vitaly


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