| 1 |
C Copyright(C) 1999-2021 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 ORDSTR (NORD, IXORD, LOLD, IOLD, ISCR, INEW) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** ORDSTR *** (GJOIN) Order a list of strings according to indices |
| 12 |
C -- Written by Greg Sjaardema - revised 07/11/90 |
| 13 |
C -- Modified from ORDIX Written by Amy Gilkey |
| 14 |
C -- |
| 15 |
C --ORDSTR orders a list of strings according to a list of indices. |
| 16 |
C -- |
| 17 |
C --Parameters: |
| 18 |
C -- NORD - IN - the number of indices |
| 19 |
C -- IXORD - IN - the indices of the ordered items |
| 20 |
C -- LOLD - IN - the length of IOLD |
| 21 |
C -- IOLD - IN - the unordered string list |
| 22 |
C -- ISCR - SCRATCH - size = LOLD |
| 23 |
C -- INEW - OUT - the ordered string list |
| 24 |
|
| 25 |
include 'exodusII.inc' |
| 26 |
|
| 27 |
INTEGER IXORD(*) |
| 28 |
character*(MXSTLN) iold(*) |
| 29 |
character*(MXSTLN) iscr(*) |
| 30 |
character*(MXSTLN) inew(*) |
| 31 |
|
| 32 |
DO 100 I = 1, LOLD |
| 33 |
ISCR(I) = IOLD(I) |
| 34 |
100 CONTINUE |
| 35 |
DO 110 I = 1, NORD |
| 36 |
INEW(I) = ISCR(IXORD(I)) |
| 37 |
110 CONTINUE |
| 38 |
|
| 39 |
RETURN |
| 40 |
END |
| 41 |
|
| 42 |
C======================================================================= |
| 43 |
SUBROUTINE ORDNAM (NORD, IXORD, LOLD, IOLD, ISCR, INEW) |
| 44 |
C======================================================================= |
| 45 |
|
| 46 |
C --*** ORDSTR *** (GJOIN) Order a list of strings according to indices |
| 47 |
C -- Written by Greg Sjaardema - revised 07/11/90 |
| 48 |
C -- Modified from ORDIX Written by Amy Gilkey |
| 49 |
C -- |
| 50 |
C --ORDSTR orders a list of strings according to a list of indices. |
| 51 |
C -- |
| 52 |
C --Parameters: |
| 53 |
C -- NORD - IN - the number of indices |
| 54 |
C -- IXORD - IN - the indices of the ordered items |
| 55 |
C -- LOLD - IN - the length of IOLD |
| 56 |
C -- IOLD - IN - the unordered string list |
| 57 |
C -- ISCR - SCRATCH - size = LOLD |
| 58 |
C -- INEW - OUT - the ordered string list |
| 59 |
|
| 60 |
include 'gj_namlen.blk' |
| 61 |
|
| 62 |
INTEGER IXORD(*) |
| 63 |
character*(namlen) iold(*) |
| 64 |
character*(namlen) iscr(*) |
| 65 |
character*(namlen) inew(*) |
| 66 |
|
| 67 |
DO I = 1, LOLD |
| 68 |
ISCR(I) = IOLD(I) |
| 69 |
end do |
| 70 |
DO I = 1, NORD |
| 71 |
INEW(I) = ISCR(IXORD(I)) |
| 72 |
end do |
| 73 |
|
| 74 |
RETURN |
| 75 |
END |