Debian Codegraph @

packages/seacas/applications/gjoin/gj_munxyz.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 MUNXYZ (NDIM, NUMNP2, NUMNP1, IXNP2, XN2, YN2, ZN2)
9 C=======================================================================
10
11 C --*** MUNXYZ *** (GJOIN) Compress coordinates from the second database
12 C -- Written by Amy Gilkey - revised 09/29/87
13 C --
14 C --MUNXYZ compresses the coordinates from the second database. The
15 C --coordinates that match the nodes in the first database are deleted
16 C --from the list.
17 C --
18 C --Parameters:
19 C -- NDIM - IN - the number of coordinates per node
20 C -- NUMNP2 - IN/OUT - the number of nodes in the second database;
21 C -- returned compressed
22 C -- NUMNP1 - IN - the number of nodes in the first database
23 C -- IXNP2 - IN/OUT - the index of the compressed node; if input as <0,
24 C -- there is no matching node and the new index is returned
25 C -- XN2, YN2, ZN2 - IN/OUT - the coordinates, returned compressed
26
27 INTEGER IXNP2(*)
28 REAL XN2(*), YN2(*), ZN2(*)
29
30 JNP = 0
31 DO 100 INP = 1, NUMNP2
32 IF (IXNP2(INP) .LT. 0) THEN
33 JNP = JNP + 1
34 IXNP2(INP) = JNP + NUMNP1
35 XN2(JNP) = XN2(INP)
36 YN2(JNP) = YN2(INP)
37 IF (NDIM .GE. 3) ZN2(JNP) = ZN2(INP)
38 END IF
39 100 CONTINUE
40
41 NUMNP2 = JNP
42
43 END