Debian Codegraph @

packages/seacas/applications/gjoin/gj_zmnps.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 ZMNPS (NUMNPS, LNPSNL,
9 & IDNPS, NNNPS, IXNNPS, LTNNPS, FACNPS)
10 C=======================================================================
11
12 C --*** ZMNPS *** (GJOIN) Compress nodal point sets
13 C -- Written by Amy Gilkey - revised 01/20/88
14 C --
15 C --ZMNPS compresses the nodal point sets by removing deleted nodes.
16 C --Assumes that the nodes are already renumbered and ordered.
17 C --
18 C --Parameters:
19 C -- NUMNPS - IN - the number of nodal point sets
20 C -- LNPSNL - IN/OUT - the length of the nodal point sets node list
21 C -- IDNPS - IN - the nodal point set ID for each set
22 C -- NNNPS - IN/OUT - the number of nodes for each set
23 C -- IXNNPS - IN/OUT - the index of the first node for each set
24 C -- LTNNPS - IN/OUT - the nodes for all sets
25 C -- FACNPS - IN/OUT - the distribution factors for all sets
26
27 INTEGER IDNPS(*)
28 INTEGER NNNPS(*)
29 INTEGER IXNNPS(*)
30 INTEGER LTNNPS(*)
31 REAL FACNPS(*)
32
33 IF (NUMNPS .LE. 0) RETURN
34
35 JNPS = 0
36 JNN = 0
37 DO 110 INPS = 1, NUMNPS
38 JNNLST = JNN
39 DO 100 NN = IXNNPS(INPS), IXNNPS(INPS)+NNNPS(INPS)-1
40 IF (LTNNPS(NN) .GT. 0) THEN
41 JNN = JNN + 1
42 LTNNPS(JNN) = LTNNPS(NN)
43 FACNPS(JNN) = FACNPS(NN)
44 END IF
45 100 CONTINUE
46 N = JNN - JNNLST
47 IF (N .GT. 0) THEN
48 JNPS = JNPS + 1
49 IDNPS(JNPS) = IDNPS(INPS)
50 NNNPS(JNPS) = N
51 IXNNPS(JNPS) = JNNLST + 1
52 END IF
53 110 CONTINUE
54
55 NUMNPS = JNPS
56 LNPSNL = JNN
57
58 RETURN
59 END