Debian Codegraph @

packages/seacas/applications/blot/makn2b.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 MAKN2B (LENF, NLNKF, LINKF, IELBST, IN2ELB)
9 C=======================================================================
10
11 C --*** MAKN2B *** (MESH) Create node to element block index
12 C -- Written by Amy Gilkey - revised 03/09/88
13 C --
14 C --MAKN2B finds the element block to be associated with each node. The
15 C --element block is determined by examining the faces which contain the
16 C --node. If they all are of the same element block, this is the node's
17 C --element block. If not, the node is assigned element block 0.
18 C --Only selected element blocks are included in the calculation.
19 C --
20 C --Parameters:
21 C -- LENF - IN - the cumulative face counts by element block
22 C -- NLNKF - IN - the number of nodes per face
23 C -- LINKF - IN - the connectivity for all faces
24 C -- IELBST - IN - the element block status (>0 if selected)
25 C -- IN2ELB - OUT - the element block for each node;
26 C -- <0 if not in any selected element block
27 C -- =0 if in more than one selected element block
28 C --
29 C --Common Variables:
30 C -- Uses NELBLK of /DBNUMS/
31 C -- Uses IS3DIM, NUMNPF of /D3NUMS/
32
33 include 'dbnums.blk'
34 include 'd3nums.blk'
35
36 INTEGER LENF(0:NELBLK+2)
37 INTEGER NLNKF(NELBLK)
38 INTEGER LINKF(*)
39 INTEGER IELBST(NELBLK)
40 INTEGER IN2ELB(NUMNPF)
41
42 CALL INIINT (NUMNPF, -999, IN2ELB)
43
44 DO 120 IELB = 1, NELBLK
45 IF (IELBST(IELB) .GT. 0) THEN
46 IXL0 = IDBLNK (IELB, 0, LENF, NLNKF) - 1
47 DO 110 IFAC = LENF(IELB-1)+1, LENF(IELB)
48 DO 100 K = 1, NLNKF(IELB)
49 INP = LINKF(IXL0+K)
50 IF (IN2ELB(INP) .LT. 0) THEN
51 IN2ELB(INP) = IELB
52 ELSE IF (IN2ELB(INP) .NE. IELB) THEN
53 IN2ELB(INP) = 0
54 END IF
55 100 CONTINUE
56 IXL0 = IXL0 + NLNKF(IELB)
57 110 CONTINUE
58 END IF
59 120 CONTINUE
60
61 RETURN
62 END