Debian Codegraph @

packages/seacas/applications/explore/exp_rdess.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 RDESS (NDB, NUMESS, LESSEL, LESSNL,
8 & IDESS, NEESS, NDESS, IXEESS, IXDESS,
9 & LTEESS, LTSESS, FACESS, NAME, ISEOF, NAMLEN)
10 C=======================================================================
11
12 C --*** RDESS *** (EXPLORE) Read database element side sets
13 C --
14 C --RDESS reads the element side set information from the database.
15 C --An error message is displayed if the end of file is read.
16 C --
17 C --Parameters:
18 C -- NDB - IN - the database file
19 C -- NUMESS - IN - the number of side sets
20 C -- LESSEL - IN - the length of the element side sets element list
21 C -- LESSNL - IN - the length of the element side sets distribution list
22 C -- IDESS - OUT - the element side set ID for each set
23 C -- NEESS - OUT - the number of elements for each set
24 C -- NDESS - OUT - the number of factors for each set
25 C -- IXEESS - OUT - the index of the first element for each set
26 C -- IXDESS - OUT - the index of the first factor for each set
27 C -- LTEESS - OUT - the elements for all sets
28 C -- LTESSS - OUT - the elements for all sets
29 C -- LTSESS - OUT - the element sides for all sets
30 C -- FACESS - OUT - the distribution factors for all sets
31 C -- ISEOF - IN/OUT - set true if end of file read
32
33 include 'exodusII.inc'
34 INTEGER IDESS(*)
35 INTEGER NEESS(*)
36 INTEGER NDESS(*)
37 INTEGER IXEESS(*)
38 INTEGER IXDESS(*)
39 INTEGER LTEESS(*)
40 INTEGER LTSESS(*)
41 REAL FACESS(*)
42 CHARACTER*(NAMLEN) NAME(*)
43 LOGICAL ISEOF
44
45 CHARACTER*80 ERRMSG
46 CHARACTER*32 STRA
47
48 if (numess .le. 0) return
49
50 CALL INIINT (NUMESS, 0, IDESS)
51 CALL INIINT (NUMESS, 0, NEESS)
52 CALL INIINT (NUMESS, 0, NDESS)
53 CALL INIINT (NUMESS, 0, IXEESS)
54 CALL INIINT (NUMESS, 0, IXDESS)
55 CALL INIINT (LESSEL, 0, LTEESS)
56 CALL INIINT (LESSEL, 0, LTSESS)
57 CALL INIREA (LESSNL, 0.0, FACESS)
58
59 C ... Read sideset ids
60 call exgssi(ndb, idess, ierr)
61 if (ierr .ne. 0) go to 100
62
63 c ... Check that all ids are unique
64 do 80 i = 1, numess
65 if (locint (idess(i), i-1, idess) .gt. 0) then
66 call intstr (1, 0, idess(i), stra, lstra)
67 call prterr ('CMDERR',
68 & 'sideset id ' // stra(:lstra) // ' is not unique')
69 end if
70 80 continue
71
72 ies = 1
73 ifs = 1
74 do 90 i = 1, numess
75 ixeess(i) = ies
76 ixdess(i) = ifs
77
78 C ... Read sideset parameters
79 call exgsp (ndb, idess(i), neess(i), ndess(i), ierr)
80 kk = neess(i)
81 kkk = ndess(i)
82 if (ierr .ne. 0) go to 110
83
84 C ... Read sideset elements and faces
85 if (neess(i) .gt. 0) then
86 call exgss (ndb, idess(i), lteess(ies), ltsess(ies), ierr)
87 if (ierr .ne. 0) go to 150
88 end if
89
90 C ... Read sideset distribution factors
91 if (ndess(i) .gt. 0) then
92 call exgssd (ndb, idess(i), facess(ifs), ierr)
93 if (ierr .ne. 0) go to 170
94 end if
95
96 ies = ies + neess(i)
97 ifs = ifs + ndess(i)
98 90 continue
99
100 C ... Read names (if they exist)
101 CALL EXGNAMS(NDB, EXSSET, numess, name, ierr)
102 RETURN
103
104 100 CONTINUE
105 WRITE (ERRMSG, 10000) 'IDS of element side sets'
106 GOTO 180
107 110 CONTINUE
108 WRITE (ERRMSG, 10000) 'NUMBERS OF ELEMENTS in element side sets'
109 GOTO 180
110 150 CONTINUE
111 WRITE (ERRMSG, 10000) 'Element side set ELEMENTS'
112 GOTO 180
113 170 CONTINUE
114 WRITE (ERRMSG, 10000) 'Element side set FACTORS'
115 GOTO 180
116 180 CONTINUE
117 CALL WDBERR (IERR, ERRMSG)
118 ISEOF = .TRUE.
119
120 RETURN
121
122 10000 FORMAT (A)
123 END