| 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 REMAP (LLIST, IX, LIST, ISCR) |
| 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 -- IX - IN - the new index of the specified item |
| 20 |
C -- LIST - IN/OUT - the list of integers; renumbered |
| 21 |
|
| 22 |
INTEGER IX(*) |
| 23 |
INTEGER LIST(*) |
| 24 |
INTEGER ISCR(*) |
| 25 |
|
| 26 |
DO 100 I = 1, LLIST |
| 27 |
ISCR(I) = 0 |
| 28 |
100 CONTINUE |
| 29 |
|
| 30 |
DO 110 I = LLIST, 1, -1 |
| 31 |
INDEX = IX(I) |
| 32 |
if (index .ne. 0) ISCR(ABS(INDEX)) = LIST(I) |
| 33 |
110 CONTINUE |
| 34 |
|
| 35 |
DO 120 I = 1, LLIST |
| 36 |
LIST(I) = ISCR(I) |
| 37 |
120 CONTINUE |
| 38 |
|
| 39 |
RETURN |
| 40 |
END |