3.3.7. Looping Over Nodes of a Face (f_node_loop)

f_node_loop(f,t,n) is a function that loops over all nodes of a given face. It consists of a single loop statement, followed by the action to be taken in braces {}.

Example

 face_t f;
 Thread *t;
 int n;
 Node *node;
 f_node_loop(f,t,n)
  {
  .
  .
  .
  node = F_NODE(f,t,n);
  .
  .
  .
  }

Here, n is the local node index number. The index number can be used with the F_NODE macro to obtain the global face node number (for example, node = F_NODE(f,t,n)).

See DEFINE_GRID_MOTION for an example of a UDF that uses f_node_loop.


Release 18.2 - © ANSYS, Inc. All rights reserved.