Debian Codegraph @

packages/seacas/applications/algebra/ag_wconat.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 WCONAT (NDBOUT, NUMELB, NUMEBO, IEL, IXELEM,
9 & NUMLNK, NUMATR, NLNKDM, NATRDM, LINK, ATRIB,
10 * BLKTYP, IDELB, NEWNOD, NODIX, LNSCR, ATRSCR)
11 C=======================================================================
12
13 C --*** WCONAT *** Write the element block connectivity and
14 C -- attribute information to the output database file
15 C -- WCONAT modified for EXODUSIIV2 8/29/95
16 C -- This file was basically just renamed to try and indicate
17 C -- What it actually does
18 C --*** WREB1 *** (ALGEBRA) Write database element block misc.
19 C -- Written by Amy Gilkey - revised 04/19/88
20 C --
21 C --Parameters:
22 C -- NDBOUT - IN - the output database file
23 C -- NUMELB - IN - the number of elements in the block
24 C -- NUMEBO - IN - the number of elements in the output block
25 C -- IEL - IN - the offset for the indices in IXELEM
26 C -- IXELEM - IN - the indices of the output elements
27 C -- (iff NUMEBO <> NUMELB)
28 C -- NUMLNK - IN - the number of nodes per element
29 C -- NUMATR - IN - the number of attributes
30 C -- LINK - IN - the element connectivity for this block
31 C -- ATRIB - IN - the attributes for this block
32 C -- BLKTYP - IN - the element block type
33 C -- IDELB - IN - element block ID
34 C -- NEWNOD - IN - true iff nodes are renumbered
35 C -- NODIX(i) - IN - the zoom mesh index for each node (iff NEWNOD)
36 C -- LNSCR - IN - connectivity scratch array
37 C -- ATRSCR - IN - attribute scratch array
38
39 include 'exodusII.inc'
40
41 INTEGER NDBOUT
42 INTEGER NUMELB
43 INTEGER NUMEBO
44 INTEGER IEL
45 INTEGER IXELEM(*)
46 INTEGER NUMLNK
47 INTEGER NUMATR
48 INTEGER NLNKDM
49 INTEGER NATRDM
50 INTEGER LINK(NLNKDM,NUMELB)
51 REAL ATRIB(NATRDM,NUMELB)
52 CHARACTER*(MXSTLN) BLKTYP
53 INTEGER IDELB
54 LOGICAL NEWNOD
55 INTEGER NODIX(*)
56 INTEGER LNSCR(NLNKDM,*)
57 REAL ATRSCR(NATRDM,*)
58
59 IEL0 = IEL - 1
60 IF ((NUMLNK .GT. 0) .AND. (NUMEBO .GT. 0)) THEN
61 IF (NUMELB .EQ. NUMEBO) THEN
62 IF (.NOT. NEWNOD) THEN
63 CALL EXPELC(NDBOUT, IDELB, LINK, IERR)
64 ELSE
65 DO 20 i=1, numlnk
66 DO 10 ne = 1, numelb
67 lnscr(i, ne) = nodix(link(i,ne))
68 10 CONTINUE
69 20 CONTINUE
70 CALL EXPELC(NDBOUT, IDELB, LNSCR, IERR)
71 END IF
72 ELSE
73 IF (.NOT. NEWNOD) THEN
74 do 40 i=1,numlnk
75 do 30 ix=1,numebo
76 lnscr(i,ix) = link(i,ixelem(ix)-iel0)
77 30 continue
78 40 continue
79 ELSE
80 do 60 i=1,numlnk
81 do 50 ix=1,numebo
82 lnscr(i,ix) = nodix(link(i,ixelem(ix)-iel0))
83 50 continue
84 60 continue
85 END IF
86 CALL EXPELC(NDBOUT, IDELB, LNSCR, IERR)
87 END IF
88 END IF
89
90 IF ((NUMATR .GT. 0) .AND. (NUMEBO .GT. 0)) THEN
91 IF (NUMELB .EQ. NUMEBO) THEN
92 call expeat(ndbout, idelb, atrib, ierr)
93 ELSE
94 DO 80 i=1, numatr
95 DO 70 ix=1,numebo
96 atrscr(i,ix) = atrib(i,ixelem(ix)-iel0)
97 70 CONTINUE
98 80 CONTINUE
99 call expeat(ndbout, idelb, atrscr, ierr)
100 END IF
101 END IF
102
103 RETURN
104 END