Debian Codegraph @

packages/seacas/applications/gjoin/gj_renix.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 RENIX (LLIST, IOFFIX, IX, LIST)
9 C=======================================================================
10
11 C --*** RENIX *** (GJOIN) Renumbers items according to an index list
12 C -- Written by Amy Gilkey - revised 09/29/87
13 C --
14 C --RENIX renumbers each item in the list to the index given in another
15 C --list or adds an offset to the item.
16 C --
17 C --Parameters:
18 C -- LLIST - IN - the length of LIST
19 C -- IOFFIX - IN - the offset to be added; if <0, use IX
20 C -- IX - IN - the new index of the specified item
21 C -- LIST - IN/OUT - the list of integers; renumbered
22
23 INTEGER IX(*)
24 INTEGER LIST(*)
25
26 IF (IOFFIX .GE. 0) THEN
27 DO 100 I = 1, LLIST
28 LIST(I) = LIST(I) + IOFFIX
29 100 CONTINUE
30 ELSE
31 DO 110 I = 1, LLIST
32 LIST(I) = IX(LIST(I))
33 110 CONTINUE
34 END IF
35
36 RETURN
37 END