Debian Codegraph @

packages/seacas/applications/ex2ex1v2/ex2_dbonm1.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 DBONM1 (NDB, NELBLK, NVAREL, ISEVOK, IEVOK, NBLKDM)
9 C=======================================================================
10 C --*** DBONM1 *** (EXOLIB) Internal to DBONAM
11 C --
12 C --DBONM1 writes the element block variable truth table.
13 C --
14 C --Parameters:
15 C -- NDB - IN - the database number
16 C -- NELBLK - IN - the number of element blocks
17 C -- NVAREL - IN - the number of element variables
18 C -- ISEVOK - IN - the element block variable truth table;
19 C -- variable i of block j exists iff ISEVOK(i,j)
20 C -- IEVOK - SCRATCH - size = NELBLK * NVAREL (may overlap ISEVOK)
21 C --
22 C --Database must be positioned in front of truth table upon entry;
23 C --upon exit positioned after table.
24
25 INTEGER NDB
26 INTEGER NELBLK, NVAREL
27 c LOGICAL ISEVOK(nvarel,*)
28 integer ISEVOK(nvarel,*)
29 INTEGER IEVOK(nvarel,*)
30
31 C --Write the element block variable truth table
32
33 IF ((NVAREL .GT. 0) .AND. (NELBLK .GT. 0)) THEN
34 DO 110 IELB = 1, NELBLK
35 DO 100 I = 1, NVAREL
36 IF (ISEVOK(I,IELB) .ne. 0) THEN
37 IEVOK(I,IELB) = 1
38 ELSE
39 IEVOK(I,IELB) = 0
40 END IF
41 100 CONTINUE
42 110 CONTINUE
43
44 WRITE (NDB) ((IEVOK(I,IELB), I=1,NVAREL), IELB=1,NELBLK)
45
46 c DO 130 IELB = 1, NELBLK
47 c DO 120 I = 1, NVAREL
48 c ISEVOK(IELB,I) = (IEVOK(IELB,I) .EQ. 1)
49 c 120 CONTINUE
50 c 130 CONTINUE
51 ELSE
52 WRITE (NDB) 0
53 END IF
54
55 RETURN
56 END