Debian Codegraph @

packages/seacas/applications/grepos/gp_ordix.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 ORDIX (NORD, IXORD, LOLD, IOLD, ISCR, INEW)
9 C=======================================================================
10
11 C --*** ORDIX *** (GJOIN) Order a list according to indices
12 C -- Written by Amy Gilkey - revised 09/29/87
13 C --
14 C --ORDIX orders a list according to a list of indices.
15 C --
16 C --Parameters:
17 C -- NORD - IN - the number of indices
18 C -- IXORD - IN - the indices of the ordered items
19 C -- LOLD - IN - the length of IOLD
20 C -- IOLD - IN - the unordered list
21 C -- ISCR - SCRATCH - size = LOLD
22 C -- INEW - OUT - the ordered list
23
24 INTEGER IXORD(*)
25 INTEGER IOLD(*)
26 INTEGER ISCR(*)
27 INTEGER INEW(*)
28
29 DO 100 I = 1, LOLD
30 ISCR(I) = IOLD(I)
31 100 CONTINUE
32 DO 110 I = 1, NORD
33 INEW(I) = ISCR(IXORD(I))
34 110 CONTINUE
35
36 RETURN
37 END