ball.zone.ball.list

Syntax

l = ball.zone.ball.list

Get the global list of ball-zone coupled balls. Use the loop foreach construct to iterate through the list.

Returns:l - ball list

Usage Example

The following example illustrates how loop foreach statement ball.zone.ball.list can be used to iterate through the list of ball-zone coupled balls in the system.

model solve calm 500 time 1.0

fish define ball_loop
  ; loop over balls
  global nballs = 0
  loop foreach local b ball.list
    nballs = nballs + 1
  endloop