Debian Codegraph @

packages/seacas/applications/grepos/gp_dboelb.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 DBOELB (NDB, NELBS, NELBE,
9 & IDELB, NUMELB, NUMLNK, NUMATR, LINK, BLKTYP, ATRIB)
10 C=======================================================================
11
12 C --*** DBOELB *** (EXOLIB) Write database element blocks
13 C --
14 C --DBOELB writes the element block information to the database.
15 C --Some dynamic dimensioning is done.
16 C --
17 C --Parameters:
18 C -- NDB - IN - the database file
19 C -- NELBS, NELBE - IN - the number of first and last element blocks
20 C -- to write
21 C -- IDELB - IN - the element block IDs for each block
22 C -- NUMELB - IN - the number of elements in each block
23 C -- NUMLNK - IN - the number of nodes per element in each block
24 C -- NUMATR - IN - the number of attributes in each block
25 C -- LINK - IN - the connectivity for each block
26 C -- ATRIB - IN - the attributes for each block
27 C --
28 include 'exodusII.inc'
29
30 INTEGER NDB
31 INTEGER IDELB(*)
32 INTEGER NUMELB(*)
33 INTEGER NUMLNK(*)
34 INTEGER NUMATR(*)
35 INTEGER LINK(*)
36 REAL ATRIB(*)
37 CHARACTER*(mxstln) BLKTYP(*)
38
39 IELNK = 0
40 IEATR = 0
41
42 call expclb(ndb, idelb, blktyp, numelb, numlnk, numatr,
43 * .FALSE., ierr)
44 IF (IERR .NE. 0) THEN
45 CALL PRTERR ('FATAL', 'Error defining element blocks')
46 END IF
47
48 DO 100 NELB = NELBS, NELBE
49 IELB = NELB-NELBS+1
50 ISLNK = IELNK + 1
51 IELNK = IELNK + NUMLNK(IELB) * NUMELB(IELB)
52 ISATR = IEATR + 1
53 IEATR = IEATR + NUMATR(IELB) * NUMELB(IELB)
54
55 if (numelb(ielb) .gt. 0 .and. numlnk(ielb) .gt. 0) then
56 call expelc(ndb, idelb(ielb), link(islnk), ierr)
57 IF (IERR .NE. 0) THEN
58 CALL PRTERR ('FATAL',
59 * 'Error writing element block connectivity')
60 END IF
61 end if
62
63 if (numatr(ielb) .gt. 0) then
64 call expeat(ndb, idelb(ielb), atrib(isatr), ierr)
65 IF (IERR .NE. 0) THEN
66 CALL PRTERR ('FATAL',
67 * 'Error writing element block attributes')
68 END IF
69 end if
70 100 CONTINUE
71
72 RETURN
73 END