Debian Codegraph @

packages/seacas/applications/gjoin/gj_getall.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 SUBROUTINE GETALL (MATCH, LLIST, LIST, NINSET, INSET)
9 C=======================================================================
10
11 C --*** GETALL *** (GJOIN) Get all items that match
12 C -- Written by Amy Gilkey - revised 09/29/87
13 C --
14 C --GETALL checks a list of values and retrieves all items which
15 C --match the given values.
16 C --
17 C --Parameters:
18 C -- MATCH - IN - the value to match
19 C -- LLIST - IN - the length of LIST
20 C -- LIST - IN - the list of values
21 C -- NINSET - OUT - the number of matching values
22 C -- INSET - OUT - the indices of the matching items
23
24 INTEGER LIST(*)
25 INTEGER INSET(*)
26
27 NINSET = 0
28 DO 100 I = 1, LLIST
29 IF (LIST(I) .EQ. MATCH) THEN
30 NINSET = NINSET + 1
31 INSET(NINSET) = I
32 END IF
33 100 CONTINUE
34
35 RETURN
36 END