Debian Codegraph @

packages/seacas/applications/blot/preb1.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 C=======================================================================
7 SUBROUTINE PREB1 (OPTION, NOUT, IEL0, NLISEL, LISEL,
8 & NLINK, NATR, LINK, ATRIB, MAPEL, MAPND)
9 C=======================================================================
10
11 C --*** PREB1 *** (BLOT) Display database element block information
12 C -- Written by Amy Gilkey - revised 01/05/88
13 C --
14 C --PREB1 displays the element block internal information (either the
15 C --connectivity or the attributes.
16 C --
17 C --Parameters:
18 C -- OPTION - IN - '*' to print all, else print options:
19 C -- 'C' to print connectivity
20 C -- 'A' to print attributes
21 C -- NOUT - IN - the output file, <=0 for standard
22 C -- IEL0 - IN - the element offset of the elements in the block
23 C -- NLISEL - IN - the number of selected elements
24 C -- LISEL - IN - the indices of the selected elements
25 C -- NLINK - IN - the number of nodes per element
26 C -- NATR - IN - the number of attributes per element
27 C -- LINK - IN - the connectivity array for this block
28 C -- ATRIB - IN - the attribute array for this block
29
30 CHARACTER*(*) OPTION
31 INTEGER LISEL(*)
32 INTEGER LINK(NLINK,*)
33 REAL ATRIB(NATR,*)
34 INTEGER MAPEL(*), MAPND(*)
35 LOGICAL ISABRT
36 LOGICAL DOCONN, DOATR
37
38 IF (NLISEL .LE. 0) RETURN
39
40 DOCONN = ((OPTION .EQ. '*') .OR. (INDEX (OPTION, 'C') .GT. 0))
41 & .AND. (NLINK .GT. 0)
42 DOATR = ((OPTION .EQ. '*') .OR. (INDEX (OPTION, 'A') .GT. 0))
43 & .AND. (NATR .GT. 0)
44 IF (.NOT. (DOCONN .OR. DOATR)) RETURN
45
46 IF (NOUT .GT. 0) THEN
47 IF (DOCONN .AND. DOATR) THEN
48 WRITE (NOUT, 10000) 'Connectivity and Attributes'
49 ELSE IF (DOCONN) THEN
50 WRITE (NOUT, 10000) 'Connectivity'
51 ELSE IF (DOATR) THEN
52 WRITE (NOUT, 10000) 'Attributes'
53 END IF
54 ELSE
55 IF (DOCONN .AND. DOATR) THEN
56 WRITE (*, 10000) 'Connectivity and Attributes'
57 ELSE IF (DOCONN) THEN
58 WRITE (*, 10000) 'Connectivity'
59 ELSE IF (DOATR) THEN
60 WRITE (*, 10000) 'Attributes'
61 END IF
62 END IF
63
64 DO 100 IX = 1, NLISEL
65 IEL = LISEL(IX)
66 NE = IEL - IEL0
67 IF (ISABRT ()) RETURN
68 IF (DOCONN) THEN
69 IF (NOUT .GT. 0) THEN
70 WRITE (NOUT, 10010, IOSTAT=IDUM)
71 & NE, MAPEL(IEL), (MAPND(LINK(I,NE)), I=1,NLINK)
72 ELSE
73 WRITE (*, 10010, IOSTAT=IDUM)
74 & NE, MAPEL(IEL), (MAPND(LINK(I,NE)), I=1,NLINK)
75 END IF
76 END IF
77 IF (DOATR) THEN
78 IF (NOUT .GT. 0) THEN
79 WRITE (NOUT, 10020, IOSTAT=IDUM)
80 & NE, MAPEL(IEL), (ATRIB(I,NE), I=1,NATR)
81 ELSE
82 WRITE (*, 10020, IOSTAT=IDUM)
83 & NE, MAPEL(IEL), (ATRIB(I,NE), I=1,NATR)
84 END IF
85 END IF
86 100 CONTINUE
87
88 RETURN
89
90 10000 FORMAT (1X, ' Local ID Global ID ', A)
91 10010 FORMAT (1X, I11, I11, 5X, 8I11, :, /,
92 & (18X, 8I11))
93 10020 FORMAT (1X, I11, I11, 3X, 4 (2X, 1PE11.4), :, /,
94 & (16X, 4 (2X, 1PE11.4)))
95 END