Debian Codegraph @

packages/seacas/applications/grepos/gp_dbist2.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 DBIST2 (NDB, TYPE, ISTEP, NVAREL, NVARDM, NELBLK,
9 & NELBDM, ISEVOK, VAREL, NUMELB, IDELB, IVAR, IELB, *)
10 C=======================================================================
11
12 C --*** DBIST2 *** (EXOLIB) Internal to DBISTE, Read element variables
13 C -- Written by Greg Sjaardema 8/8/90, to remove MAX from dimensions
14 C --
15 C --DBIST2 reads the database element variables for one time step.
16 C --
17 C --Parameters:
18 C -- NDB - IN - the database number
19 C -- NVAREL - IN - the number of element variables
20 C -- NVARDM - IN - the row dimension of VAREL
21 C -- NELBLK - IN - the number of element blocks
22 C -- NELBDM - IN - the row dimension of ISEVOK
23 C -- ISEVOK - IN - the element block variable truth table;
24 C -- variable i of block j exists iff ISEVOK(j,i)
25 C -- VAREL - OUT - the element variables for the time step (if OPTION)
26 C -- IVAR - OUT - the nodal variable number if error on read.
27 C -- IELB - OUT - the element block number if error on read.
28 C -- * - return statement if error encountered, including end-of-file;
29 C -- message is printed
30 C --
31 include 'exodusII.inc'
32 INTEGER NDB
33 CHARACTER*1 TYPE
34 INTEGER NVAREL, NVARDM, NELBLK, NELBDM
35 INTEGER NUMELB(*)
36 INTEGER IDELB(*)
37 LOGICAL ISEVOK(NELBDM,*)
38 REAL VAREL(*)
39
40 iel0 = 1
41 do 120 ivar = 1, nvarel
42 do 130 ielb = 1, nelblk
43
44 C ... To make it easier to handle consolidating blocks, we read in
45 C or store data for all variables. If variable exists, read it,
46 C if not, then zero-fill. Remember to do this on modification,
47 C and on output also...
48 C This lets us treat the VAREL array as a rectangular array
49 C of dimension (NUMEL, NVAREL)
50
51 id = idelb(ielb)
52 if (isevok(ielb,ivar)) then
53 if (type .eq. 'E') then
54 call exgev (ndb, istep, ivar, idelb(ielb),
55 & numelb(ielb), varel(iel0), ierr)
56 else if (type .eq. 'M') then
57 call exgnsv (ndb, istep, ivar, idelb(ielb),
58 & numelb(ielb), varel(iel0), ierr)
59 else if (type .eq. 'S') then
60 call exgssv (ndb, istep, ivar, idelb(ielb),
61 & numelb(ielb), varel(iel0), ierr)
62 end if
63 else
64 do 110 i = 0, numelb(ielb)-1
65 varel(iel0 + i) = 0.0
66 110 continue
67 end if
68 iel0 = iel0 + numelb(ielb)
69 130 continue
70 120 continue
71 RETURN
72 END