Accessing groups
The contents of a group can be determined at run-time by calling the subroutine
NAMAR
. This fills an array with internal labels of elements that
belong to the group. If the array is not large enough to contain the list, other memory
will be overwritten during the call. Therefore, it is important to declare the array
large enough and to check that the group size was within these bounds.
The contents of the group should be determined at initialization only. To preserve the
contents of the array and associated variables between calls to USER1
,
use the FORTRAN SAVE
statement.
It is possible to find a group that contains a particular element using the function
NAME
. This routine searches an alphabetically sorted list of group
names and returns the name of the first group that contains the element.