| 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 DBINM1 (NDB, TYPE, OPTION, NBLK, NVAR, ISEVOK, IEVOK, |
| 9 |
& ITMP, IERR, NBDM, *) |
| 10 |
C======================================================================= |
| 11 |
C --*** DBINM1 *** (EXOLIB) Internal to DBINAM |
| 12 |
C -- Written by Amy Gilkey - revised 02/18/88 |
| 13 |
C -- |
| 14 |
C --DBINM1 reads the element block variable truth table. |
| 15 |
C -- |
| 16 |
C --Parameters: |
| 17 |
C -- NDB - IN - the database number |
| 18 |
C -- OPTION - IN - ' ' to not store, '*' to store all, else store options: |
| 19 |
C -- 'T' to store element block variable truth table |
| 20 |
C -- NELBLK - IN - the number of element blocks |
| 21 |
C -- NVAREL - IN - the number of element variables |
| 22 |
C -- ISEVOK - OUT - the element block variable truth table; |
| 23 |
C -- variable i of block j exists iff ISEVOK(j,i) |
| 24 |
C -- IEVOK - OUT - the element block variable truth table; |
| 25 |
C -- variable i of block j exists iff ISEVOK(j,i) is NOT 0 |
| 26 |
C -- IERR - OUT - the returned read error flag |
| 27 |
C -- * - OUT - return statement if error encountered |
| 28 |
C -- NO message is printed |
| 29 |
C -- |
| 30 |
C --Database must be positioned in front of truth table upon entry; |
| 31 |
C --upon exit positioned after table. |
| 32 |
|
| 33 |
include 'exodusII.inc' |
| 34 |
INTEGER NDB |
| 35 |
CHARACTER*1 TYPE |
| 36 |
CHARACTER*(*) OPTION |
| 37 |
INTEGER NBLK, NVAR |
| 38 |
LOGICAL ISEVOK(NBDM,*) |
| 39 |
INTEGER IEVOK(NBDM,*) |
| 40 |
INTEGER ITMP(NVAR,NBDM) |
| 41 |
INTEGER IERR |
| 42 |
|
| 43 |
if (nvar .le. 0) return |
| 44 |
IF ((OPTION .EQ. '*') .OR. (INDEX (OPTION, 'T') .GT. 0)) THEN |
| 45 |
if (type .eq. 'E') then |
| 46 |
call exgvtt (ndb, nblk, nvar, itmp, ierr) |
| 47 |
else if (type .eq. 'M') then |
| 48 |
call exgnstt (ndb, nblk, nvar, itmp, ierr) |
| 49 |
else if (type .eq. 'S') then |
| 50 |
call exgsstt (ndb, nblk, nvar, itmp, ierr) |
| 51 |
end if |
| 52 |
IF (ierr .eq. 17) then |
| 53 |
DO 20 I = 1, NVAR |
| 54 |
DO 10 IELB = 1, NBLK |
| 55 |
ISEVOK(IELB,I) = .true. |
| 56 |
10 CONTINUE |
| 57 |
20 CONTINUE |
| 58 |
ELSE |
| 59 |
DO 110 I = 1, NVAR |
| 60 |
DO 100 IELB = 1, NBLK |
| 61 |
ISEVOK(IELB,I) = (ITMP(I,IELB) .NE. 0) |
| 62 |
100 CONTINUE |
| 63 |
110 CONTINUE |
| 64 |
ENDIF |
| 65 |
|
| 66 |
END IF |
| 67 |
|
| 68 |
RETURN |
| 69 |
|
| 70 |
END |