Debian Codegraph @

packages/seacas/applications/grepos/gp_zmxyz.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 ZMXYZ (NDIM, NUMNP, IXNP, XN, YN, ZN)
9 C=======================================================================
10 C --*** ZMXYZ *** (GJOIN) Compress coordinates
11 C -- Written by Amy Gilkey - revised 01/20/88
12 C --
13 C --ZMXYZ compresses the coordinates by removing deleted nodes.
14 C --
15 C --Parameters:
16 C -- NDIM - IN - the number of coordinates per node
17 C -- NUMNP - IN/OUT - the number of nodes; returned compressed
18 C -- IXNP - IN/OUT - the index of the compressed node; 0 if deleted
19 C -- XN, YN, ZN - IN/OUT - the coordinates, returned compressed
20
21 INTEGER IXNP(*)
22 REAL XN(*), YN(*), ZN(*)
23
24 JNP = 0
25 DO 100 INP = 1, NUMNP
26 IF (IXNP(INP) .GT. 0) THEN
27 JNP = JNP + 1
28 XN(JNP) = XN(INP)
29 YN(JNP) = YN(INP)
30 IF (NDIM .GE. 3) ZN(JNP) = ZN(INP)
31 IXNP(INP) = JNP
32 ELSE IF (IXNP(INP) .LT. 0) THEN
33 IXNP(INP) = -IXNP(-IXNP(INP))
34 END IF
35 100 CONTINUE
36
37 NUMNP = JNP
38
39 END