Debian Codegraph @

packages/seacas/applications/ex1ex2v2/ex1_dbimap.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 DBIMAP (NDB, OPTION, NUMEL, MAPEL, *)
9 C=======================================================================
10
11 C --*** DBIMAP *** (EXOLIB) Read database element order map
12 C -- Written by Amy Gilkey - revised 10/14/87
13 C --
14 C --DBIMAP reads the element order map from the database. An error
15 C --message is displayed if the end of file is read.
16 C --
17 C --Parameters:
18 C -- NDB - IN - the database file
19 C -- OPTION - IN - ' ' to not store, '*' to store all, else store options:
20 C -- 'M' to store map
21 C -- NUMEL - IN - the number of elements
22 C -- MAPEL - OUT - the element order map (if OPTION)
23 C -- * - return statement if end of file or read error
24 C --
25 C --Database must be positioned at start of map upon entry;
26 C --upon exit at end of map.
27
28 INTEGER NDB
29 CHARACTER*(*) OPTION
30 INTEGER NUMEL
31 INTEGER MAPEL(*)
32
33 CHARACTER*80 ERRMSG
34
35 IF ((OPTION .EQ. '*') .OR. (INDEX (OPTION, 'M') .GT. 0)) THEN
36 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
37 & (MAPEL(IEL), IEL=1,NUMEL)
38 ELSE
39 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
40 END IF
41
42 RETURN
43
44 100 CONTINUE
45 ERRMSG = 'ELEMENT ORDER MAP'
46 CALL DBERR (IERR, ERRMSG)
47 RETURN 1
48 END