Debian Codegraph @

packages/seacas/applications/ex2ex1v2/ex2_dbonam.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 DBONAM (NDB,
9 & NDIM, NELBLK, NVARHI, NVARGL, NVARNP, NVAREL,
10 & NAMECO, NAMELB, NAMEHV, NAMEGV, NAMENV, NAMEEV, ISEVOK)
11 C=======================================================================
12 C --*** DBONAM *** (EXOLIB) Write database names
13 C --
14 C --DBONAM writes the names of the coordinates, the element block types,
15 C --and the database variables to the database. The element block variable
16 C --truth table is also written.
17 C --
18 C --Parameters:
19 C -- NDB - IN - the database number
20 C -- NDIM - IN - the number of coordinates per node; written only if >= 0
21 C -- NELBLK - IN - the number of element blocks; written only if >= 0
22 C -- NVARHI - IN - the number of history variables; written only if >= 0
23 C -- NVARGL - IN - the number of global variables
24 C -- NVARNP - IN - the number of nodal variables
25 C -- NVAREL - IN - the number of element variables
26 C -- NAMECO - IN - the names of the coordinates
27 C -- NAMELB - IN - the names of the element block types
28 C -- NAMEHV - IN - the names of the history variables
29 C -- NAMEGV - IN - the names of the global variables
30 C -- NAMENV - IN - the names of the nodal variables
31 C -- NAMEEV - IN - the names of the element variables
32 C -- ISEVOK - IN - the element block variable truth table;
33 C -- variable i of block j exists iff ISEVOK(i,j)
34 C --
35 C --Database must be positioned in front of coordinate names upon entry;
36 C --upon exit positioned after element block variable truth table.
37
38 INTEGER NDB
39 INTEGER NDIM, NELBLK, NVARHI, NVARGL, NVARNP, NVAREL
40 CHARACTER*8 NAMECO(*)
41 CHARACTER*8 NAMELB(*)
42 CHARACTER*8 NAMEHV(*)
43 CHARACTER*8 NAMEGV(*)
44 CHARACTER*8 NAMENV(*)
45 CHARACTER*8 NAMEEV(*)
46 c LOGICAL ISEVOK(*)
47 integer ISEVOK(*)
48
49 C --Write coordinate names
50
51 IF (NDIM .LT. 0) GOTO 100
52
53 IF (NDIM .GT. 0) THEN
54 WRITE (NDB) (NAMECO(I), I=1,NDIM)
55 ELSE
56 WRITE (NDB) 0
57 END IF
58
59 C --Write element block type names
60
61 IF (NELBLK .LT. 0) GOTO 100
62
63 IF (NELBLK .GT. 0) THEN
64 WRITE (NDB) (NAMELB(I), I=1,NELBLK)
65 ELSE
66 WRITE (NDB) 0
67 END IF
68
69 C --Write the variable names
70
71 IF (NVARHI .LT. 0) GOTO 100
72
73 WRITE (NDB) NVARHI, NVARGL, NVARNP, NVAREL
74
75 IF (NVARHI + NVARGL + NVARNP + NVAREL .GT. 0) THEN
76 WRITE (NDB)
77 & (NAMEHV(I), I=1,NVARHI),
78 & (NAMEGV(I), I=1,NVARGL),
79 & (NAMENV(I), I=1,NVARNP),
80 & (NAMEEV(I), I=1,NVAREL)
81 ELSE
82 WRITE (NDB) 0
83 END IF
84
85 C --Write the element block variable truth table
86
87 CALL DBONM1 (NDB, NELBLK, NVAREL, ISEVOK, ISEVOK, MAX(NVAREL,1))
88
89 100 CONTINUE
90 RETURN
91 END