Debian Codegraph @

packages/seacas/applications/grepos/gp_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, ISTAT, LNPSNL, LNPSDF,
9 & IDNPS, NNNPS, IXNNPS, LTNNPS, FACNPS, NAME)
10 C=======================================================================
11 C --*** ZMNPS *** (GJOIN) Compress nodal point sets
12 C -- Written by Amy Gilkey - revised 01/20/88
13 C --
14 C --ZMNPS compresses the nodal point sets by removing deleted nodes.
15 C --Assumes that the nodes are already renumbered and ordered.
16 C --
17 C --Parameters:
18 C -- NUMNPS - IN - the number of nodal point sets
19 C -- LNPSNL - IN/OUT - the length of the nodal point sets node list
20 C -- LNPSDF - IN/OUT - the length of the dist.fact. 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 include 'gp_namlen.blk'
28
29 INTEGER ISTAT(*)
30 INTEGER IDNPS(*)
31 INTEGER NNNPS(*)
32 INTEGER IXNNPS(*)
33 INTEGER LTNNPS(*)
34 REAL FACNPS(*)
35 CHARACTER*(maxnam) NAME(*)
36
37 IF (NUMNPS .LE. 0) RETURN
38
39 IF (LNPSDF .NE. LNPSNL .AND. LNPSDF .NE. 0) then
40 call prterr('ERROR',
41 * 'Length of nodeset dist. fact. list must be zero or '//
42 * 'equal to length of nodeset node list. It is neither.')
43 end if
44
45 JNPS = 0
46 JNN = 0
47 DO 110 INPS = 1, NUMNPS
48 JNNLST = JNN
49 DO 100 NN = IXNNPS(INPS), IXNNPS(INPS)+NNNPS(INPS)-1
50 IF (LTNNPS(NN) .GT. 0) THEN
51 JNN = JNN + 1
52 LTNNPS(JNN) = LTNNPS(NN)
53 if (LNPSDF .NE. 0) then
54 FACNPS(JNN) = FACNPS(NN)
55 end if
56 END IF
57 100 CONTINUE
58 N = JNN - JNNLST
59 IF (N .GT. 0) THEN
60 JNPS = JNPS + 1
61 IDNPS(JNPS) = IDNPS(INPS)
62 NNNPS(JNPS) = N
63 IXNNPS(JNPS) = JNNLST + 1
64 NAME(JNPS) = NAME(INPS)
65 ELSE
66 ISTAT(INPS) = -IDNPS(INPS)
67 END IF
68 110 CONTINUE
69
70 NUMNPS = JNPS
71 LNPSNL = JNN
72 if (lnpsdf .ne. 0) lnpsdf = jnn
73
74 RETURN
75 END