Debian Codegraph @

packages/seacas/applications/numbers/nu_unique.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 SUBROUTINE UNIQUE (LSTSN, NSEG, MAP, ITMP, NUMNIQ, NUMNP)
8
9 C***********************************************************************
10
11 C DESCRIPTION:
12 C This routine determines the number of unique node numbers in
13 C a side set.
14
15 C FORMAL PARAMETERS:
16 C LSTSN INTEGER List of nodes on this boundary
17 C NSEG INTEGER Number of nodes in side set
18 C MAP INTEGER Relates node in side set to list of unique nodes
19 C ITMP INTEGER Temporary array for sorting nodes
20 C NUMNIQ INTEGER Number of unique nodes
21 C NDIM INTEGER Number of spatial dimensions
22
23 C CALLED BY:
24
25 C***********************************************************************
26
27 DIMENSION LSTSN(*), MAP(*), ITMP(*)
28
29 CALL INIINT (NSEG, 0, MAP)
30 CALL INIINT (NUMNP, 0, ITMP)
31
32 NUMNIQ = 0
33 DO 30 I = 1 , NSEG
34 IF ( ITMP(LSTSN(I)) .EQ. 0 ) THEN
35 NUMNIQ = NUMNIQ + 1
36 ITMP(LSTSN(I)) = NUMNIQ
37 MAP(I) = NUMNIQ
38 ELSE
39 MAP(I) = ITMP(LSTSN(I))
40 END IF
41 30 CONTINUE
42
43 RETURN
44 END