Debian Codegraph @

packages/seacas/applications/ex1ex2v2/ex1_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, NVAREL, NELBLK, NELBDM, ISEVOK,
9 $ VAREL, NUMELB, IVAR, IELB, *)
10 C=======================================================================
11 C --*** DBIST2 *** (EXOLIB) Internal to DBISTE, Read element variables
12 C --
13 C --DBIST2 reads the database element variables for one time step.
14 C --
15 C --Parameters:
16 C -- NDB - IN - the database number
17 C -- NVAREL - IN - the number of element variables
18 C -- NVARDM - IN - the row dimension of VAREL
19 C -- NELBLK - IN - the number of element blocks
20 C -- NELBDM - IN - the row dimension of ISEVOK
21 C -- ISEVOK - IN - the element block variable truth table;
22 C -- variable i of block j exists iff ISEVOK(j,i)
23 C -- VAREL - OUT - the element variables for the time step (if OPTION)
24 C -- IVAR - OUT - the nodal variable number if error on read.
25 C -- IELB - OUT - the element block number if error on read.
26 C -- * - return statement if error encountered, including end-of-file;
27 C -- message is printed
28 C --
29 INTEGER NDB
30 INTEGER NVAREL, NELBLK, NELBDM
31 INTEGER NUMELB(*)
32 c LOGICAL ISEVOK(nvarel,*)
33 integer ISEVOK(nvarel,*)
34 REAL VAREL(*)
35
36 IELo = 0
37 DO 130 IELB = 1, NELBLK
38 DO 120 IVAR = 1, NVAREL
39 IF (ISEVOK(IVAR,IELB) .ne. 0) THEN
40 READ (NDB, END=200, ERR=200, IOSTAT=IERR)
41 & (VAREL(IELo+N), N=1,NUMELB(IELB))
42 ielo=ielo+numelb(ielb)
43 END IF
44 120 CONTINUE
45 130 CONTINUE
46 RETURN
47 200 CONTINUE
48 RETURN 1
49 END