Debian Codegraph @

packages/seacas/applications/grepos/gp_refnod.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 REFNOD (NELB, IDELB, NUMELB, NUMLNK, LINK, NUMNP, MAP)
9 C=======================================================================
10
11 C --*** REFNOD *** (GREPOS) Reference nodes on all elements
12 C -- Written by Greg Sjaardema - revised 03/02/90
13 C --
14 C --Parameters:
15 C -- NELB - IN - the number of element blocks
16 C -- IDELB - IN - the element block IDs for each block
17 C -- NUMELB - IN - the number of elements in each block
18 C -- NUMLNK - IN - the number of nodes per element in each block
19 C -- LINK - IN - the connectivity for each block
20 C -- NUMNP - IN/OUT - the number of nodes on input, the number of
21 C active nodes on exit.
22 C -- MAP - OUT - list of active nodes
23 C -- map(i) > 0 for active node
24 C -- map(i) = length of map()+1 for deleted node
25
26 INTEGER IDELB(NELB)
27 INTEGER NUMELB(NELB)
28 INTEGER NUMLNK(NELB)
29 INTEGER LINK(*)
30 INTEGER MAP(NUMNP)
31
32 CALL INIINT (NUMNP, 0, MAP)
33
34 IELNK = 0
35 DO 10 IELB = 1, NELB
36 ISLNK = IELNK + 1
37 IELNK = IELNK + NUMLNK(IELB) * NUMELB(IELB)
38
39 IF (IDELB(IELB) .NE. 0) THEN
40 CALL REFND1 (NELB, NUMELB(IELB), NUMLNK(IELB), LINK(ISLNK),
41 & MAP)
42 END IF
43 10 CONTINUE
44
45 C .. Set up map of old number to new number. If old id = I, then
46 C new id = MAP(I)
47
48 NEWID = 0
49 DO 20 NP = 1, NUMNP
50 IF (MAP(NP) .GT. 0) THEN
51 NEWID = NEWID + 1
52 MAP(NP) = NEWID
53 ELSE
54 MAP(NP) = NUMNP+1
55 END IF
56 20 CONTINUE
57 NUMNP = NEWID
58
59 RETURN
60 END