Debian Codegraph @

packages/seacas/applications/blot/cntlk3.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 CNTLK3 (NELBLK, LENE, NLNKE, LENLNK, NFACES, NAMELB,
9 $ NLNKSC)
10 C=======================================================================
11
12 C --*** CNTLK3 *** (MESH) Return link array length and number faces (3D)
13 C -- Written by Amy Gilkey - revised 03/04/88
14 C --
15 C --CNTLK3 returns the maximum length of the connectivity array for
16 C --the faces and the maximum number of faces that may be defined.
17 C --
18 C --Parameters:
19 C -- NELBLK - IN - the number of element blocks
20 C -- LENE - IN - the cumulative element counts by element block
21 C -- NLNKE - IN - the number of nodes per element
22 C -- LENLNK - OUT - the length of the connectivity array
23 C -- NELEMS - OUT - the number of elements
24
25 INTEGER LENE(0:*)
26 INTEGER NLNKE(*)
27 CHARACTER*(*) NAMELB(*)
28 INTEGER NLNKSC(*)
29
30 NFACES = 0
31 LENLNK = 0
32 DO 100 IELB = 1, NELBLK
33 NUME = LENE(IELB) - LENE(IELB-1)
34 IF (NAMELB(IELB)(:3) .EQ. 'HEX' .and. NLNKE(IELB) .GE. 8) THEN
35 NF = 6
36 NL = 4
37 ELSE IF (NAMELB(IELB)(:3) .EQ. 'TET') THEN
38 NF = 4
39
40 C ... Even though there are only 3 nodes per face, we fake that there
41 C are 4 nodes for consistency with the rest of blot...
42 NL = 4
43 ELSE IF (NAMELB(IELB)(:3) .EQ. 'WED') THEN
44 NF = 5
45 NL = 4
46 ELSE IF (NAMELB(IELB)(:3) .EQ. 'PYR') THEN
47 NF = 5
48 NL = 4
49 ELSE
50 NF = 1
51 NL = NLNKE(IELB)
52 END IF
53 NLNKSC(IELB) = NL
54 NFACES = NFACES + NUME * NF
55 LENLNK = LENLNK + NUME * NF * NL
56 100 CONTINUE
57
58 RETURN
59 END