Debian Codegraph @

packages/seacas/applications/txtexo/rdmap.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 RDMAP (NTXT, NUM, MAP, *)
9 C=======================================================================
10
11 C --*** RDMAP *** (TXTEXO) Read database element order map
12 C -- Written by Amy Gilkey - revised 02/27/86
13 C --
14 C --RDMAP reads the element order map, node number map, and element
15 C number maps from the text file. An error
16 C --message is displayed if the end of file is read.
17 C --
18 C --Parameters:
19 C -- NTXT - IN - the text file
20 C -- NUM - IN - the number of elements or nodes
21 C -- MAP - OUT - the map
22 C -- * - return statement if end of file or read error
23 C --
24 C --Database must be positioned at start of map upon entry;
25 C --upon exit at end of map.
26
27 INTEGER MAP(*)
28 CHARACTER*80 LINE
29
30 READ (NTXT, *, END=100, ERR=100)
31 READ (NTXT, '(A)', END=100, ERR=100) LINE
32 C ... Check for keyword 'sequence' at beginning of line
33 if (line(:8) .eq. 'sequence' .or. line(:8) .eq. 'SEQUENCE') then
34 do 10 i=1, num
35 map(i) = i
36 10 continue
37 else
38 READ (NTXT, *, END=100, ERR=100) (MAP(I), I=1,NUM)
39 end if
40
41 RETURN
42
43 100 CONTINUE
44 CALL PRTERR ('FATAL', 'Reading MAP')
45 RETURN 1
46 END