3.3.6. Looping Over Nodes of a Cell (c_node_loop)

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

Example:

 cell_t c;
 Thread *t;
 int n;
 Node *node;
 c_node_loop(c,t,n)
  {
  .
  .
  node = C_NODE(c,t,n);
  .
  .
  } 

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


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