Debian Codegraph @

packages/seacas/applications/txtexo/rdelb.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 RDELB (NTXT, IELB, IDELB, NUMELB, NUMLNK, NUMATR,
9 & NAMELB, A, KLINK, KATRIB, *)
10 C=======================================================================
11
12 C --*** RDELB *** (TXTEXO) Read database element block
13 C -- Written by Amy Gilkey - revised 02/27/86
14 C --
15 C --RDELB reads the element block information from the text file.
16 C --Some dynamic dimensioning is done.
17 C --An error message is displayed if the end of file is read.
18 C --
19 C --Parameters:
20 C -- NTXT - IN - the text file
21 C -- IELB - IN - the element block number
22 C -- IDELB - IN - the id for this block
23 C -- NUMELB - IN - the number of elements in this block
24 C -- NUMLNK - IN - the number of nodes per element in this block
25 C -- NUMATR - IN - the number of attributes in this block
26 C -- A - IN - the dynamic memory base array
27 C -- KLINK - IN - pointer to the element connectivity for this block
28 C -- KATRIB - IN - pointer to the attributes for this block
29 C -- * - return statement if end of file or read error
30 C --
31 C --Database must be positioned at start of element block information
32 C --upon entry; upon exit at end of element block information.
33
34 include 'exodusII.inc'
35 DIMENSION A(*)
36 CHARACTER*(MXSTLN) NAMELB
37 CHARACTER*32 STRA
38
39 NAMELB = ' '
40 READ (NTXT, *, END=110, ERR=110)
41 READ (NTXT, *, END=110, ERR=110) IDELB, NUMELB, NAMELB
42
43 C ... Strip everything in namelb from first space to end
44 IEX = index(namelb, " ")
45 if (iex .gt. 0) then
46 namelb(iex:) = " "
47 end if
48
49 READ (NTXT, *, END=110, ERR=110) NUMLNK, NUMATR
50
51 IECON = NUMLNK * NUMELB
52 CALL MDLONG ('LINK', KLINK, IECON)
53 IEATR = NUMATR * NUMELB
54 CALL MDLONG ('ATRIB', KATRIB, IEATR)
55 CALL MDSTAT (NERR, MEM)
56 IF (NERR .GT. 0) GOTO 100
57
58 CALL RDEB1 (NTXT, IELB, NUMELB, NUMLNK, NUMATR,
59 & A(KLINK), A(KATRIB), max(1,numatr), *120)
60
61 100 CONTINUE
62 RETURN
63
64 110 CONTINUE
65 CALL INTSTR (1, 0, IELB, STRA, LSTRA)
66 CALL PRTERR ('FATAL',
67 & 'Reading ELEMENT BLOCK SIZING PARAMETERS for block '
68 & // STRA(:LSTRA))
69 120 CONTINUE
70 RETURN 1
71 END