Debian Codegraph @

packages/seacas/applications/explore/exp_prxyz.f

raw
1 C Copyright(C) 1999-2020, 2023 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 C=======================================================================
7 SUBROUTINE PRXYZ (OPTION, NOUT, NDIM, NAMECO, NUMNP, LISNP, CORD,
8 * MAP, DOMAP)
9 C=======================================================================
10
11 C --*** PRXYZ *** (EXPLORE) Display database coordinates
12 C --
13 C --PRXYZ displays the coordinate array.
14 C --
15 C --Parameters:
16 C -- OPTION - IN - '*' to print all, else print options
17 C -- NOUT - IN - the output file, <=0 for standard
18 C -- NDIM - IN - the number of coordinates per node
19 C -- NAMECO - IN - the coordinate names
20 C -- NUMNP - IN - the number of nodes
21 C -- LISNP - IN - the indices of the selected nodes
22 C -- CORD - IN - the nodal coordinates
23
24 include 'exodusII.inc'
25 CHARACTER*(*) OPTION
26 CHARACTER*(*) NAMECO(*)
27 INTEGER LISNP(0:*)
28 REAL CORD(NUMNP,NDIM)
29 INTEGER MAP(*)
30 LOGICAL DOMAP
31 INTEGER GETPRC, PRTLEN
32 CHARACTER*128 FMT1, FMT
33
34 PRTLEN = GETPRC() + 7
35 WRITE(FMT1,20) PRTLEN, PRTLEN-7
36 CALL SQZSTR(FMT1, LFMT)
37 WRITE(FMT, 30) FMT1(:LFMT), FMT1(:LFMT)
38
39 IF (NOUT .GT. 0) WRITE (NOUT, 10000)
40
41 if (domap) then
42 if (nout .gt. 0) then
43 write (nout, 10005)
44 else
45 write (*, 10005)
46 end if
47 end if
48 IF (NOUT .GT. 0) THEN
49 WRITE (NOUT, 10010) (NAMECO(I)(:8), I=1,NDIM)
50 ELSE
51 WRITE (*, 10010) (NAMECO(I)(:8), I=1,NDIM)
52 END IF
53
54 DO 100 IX = 1, LISNP(0)
55 INP = LISNP(IX)
56 if (domap) then
57 id = map(inp)
58 else
59 id = inp
60 end if
61 IF (NOUT .GT. 0) THEN
62 WRITE (NOUT, FMT, IOSTAT=IDUM)
63 & ID, (CORD(INP,I), I=1,NDIM)
64 ELSE
65 WRITE (*, FMT, IOSTAT=IDUM)
66 & ID, (CORD(INP,I), I=1,NDIM)
67 END IF
68 100 CONTINUE
69
70 RETURN
71
72 10000 FORMAT (/, 1X, 'COORDINATES')
73 10005 FORMAT (1X, 'Nodal ids are Global')
74 20 FORMAT('1PE',I2.2,'.',I2.2)
75 30 FORMAT('(1X, ''Node'', I12, 5 (2X, ',A,'), :, /,',
76 $ '(15X, 5 (2X, ',A,')))')
77
78 10010 FORMAT (/, 1X, 8X, 5X, 4X, 5 (2X, A8, :, 3X), :, /,
79 & (1X, 6 (7X, A8, :, 9X)))
80 END