Debian Codegraph @

packages/seacas/applications/ex1ex2v2/ex1_dbixyz.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 DBIXYZ (NDB, OPTION, NDIM, NUMNP, XN, YN, ZN, *)
9 C=======================================================================
10
11 C --*** DBIXYZ *** (EXOLIB) Read database coordinates
12 C -- Written by Amy Gilkey - revised 10/14/87
13 C --
14 C --DBIXYZ reads the coordinate array 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 -- 'C' to store coordinates
21 C -- NDIM - IN - the number of coordinates per node
22 C -- NUMNP - IN - the number of nodes
23 C -- XN, YN, ZN - OUT - the coordinates (if OPTION)
24 C -- * - return statement if end of file or read error
25 C --
26 C --Database must be positioned at start of coordinates upon entry;
27 C --upon exit at end of coordinates.
28
29 INTEGER NDB
30 CHARACTER*(*) OPTION
31 INTEGER NDIM, NUMNP
32 REAL XN(*), YN(*), ZN(*)
33
34 CHARACTER*80 ERRMSG
35
36 IF ((OPTION .EQ. '*') .OR. (INDEX (OPTION, 'C') .GT. 0)) THEN
37 IF (NDIM .EQ. 1) THEN
38 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
39 & (XN(INP), INP=1,NUMNP)
40 ELSE IF (NDIM .EQ. 2) THEN
41 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
42 & (XN(INP), INP=1,NUMNP), (YN(INP), INP=1,NUMNP)
43 ELSE IF (NDIM .EQ. 3) THEN
44 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
45 & (XN(INP), INP=1,NUMNP), (YN(INP), INP=1,NUMNP),
46 & (ZN(INP), INP=1,NUMNP)
47 ELSE
48 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
49 END IF
50 ELSE
51 READ (NDB, END=100, ERR=100, IOSTAT=IERR)
52 END IF
53
54 RETURN
55
56 100 CONTINUE
57 ERRMSG = 'NODAL COORDINATES'
58 CALL DBERR (IERR, ERRMSG)
59 RETURN 1
60 END