Debian Codegraph @

packages/seacas/applications/explore/exp_prnode.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 C=======================================================================
7 SUBROUTINE PRNODE (OPTION, NOUT, NUMNP, LISNP,
8 & NVARNP, LISNV, NAMENV, VARNP, MAP, DOMAP)
9 C=======================================================================
10
11 C --*** PRNODE *** (EXPLORE) Display current database nodal variables
12 C --
13 C --PRNODE displays the nodal data for a time step.
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 -- NUMNP - IN - the number of nodes
19 C -- LISNP - IN - the indices of the selected nodes
20 C -- NVARNP - IN - the number of nodal variables
21 C -- LISNV - IN - the indices of the selected nodal variables
22 C -- NAMENV - IN - the names of the nodal variables
23 C -- VARNP - IN - the nodal variables for the time step
24
25 include 'exodusII.inc'
26 CHARACTER*(*) OPTION
27 INTEGER LISNP(0:*)
28 INTEGER LISNV(0:*)
29 CHARACTER*(*) NAMENV(*)
30 REAL VARNP(numnp,*)
31 INTEGER MAP(*)
32 LOGICAL DOMAP
33 INTEGER GETPRC, PRTLEN
34 CHARACTER*128 FMT1, FMT
35
36 PRTLEN = GETPRC() + 7
37 WRITE(FMT1,20) PRTLEN, PRTLEN-7
38 CALL SQZSTR(FMT1, LFMT)
39 WRITE(FMT, 30) FMT1(:LFMT), FMT1(:LFMT)
40
41 IF (NOUT .GT. 0) WRITE (NOUT, 10000)
42
43 if (domap) then
44 if (nout .gt. 0) then
45 write (nout, 10005)
46 else
47 write (*, 10005)
48 end if
49 end if
50
51 do 90 i=1, lisnv(0)
52 irow = ((i-1)/5)+1
53 icol = i - (irow-1)*5
54 IF (NOUT .GT. 0) THEN
55 WRITE (NOUT, 10010) irow, icol, NAMENV(LISNV(I))
56 ELSE
57 WRITE (*, 10010) irow, icol, NAMENV(LISNV(I))
58 END IF
59 90 continue
60
61 DO 100 IX = 1, LISNP(0)
62 INP = LISNP(IX)
63 if (domap) then
64 id = map(inp)
65 else
66 id = inp
67 end if
68
69 IF (NOUT .GT. 0) THEN
70 WRITE (NOUT, FMT, IOSTAT=IDUM)
71 & ID, (VARNP(INP, LISNV(I)), I=1,LISNV(0))
72 ELSE
73 WRITE (*, FMT, IOSTAT=IDUM)
74 & ID, (VARNP(INP, LISNV(I)), I=1,LISNV(0))
75 END IF
76 100 CONTINUE
77
78 RETURN
79
80 20 FORMAT('1PE',I2.2,'.',I2.2)
81 30 FORMAT('(1X, ''Node'', I12, 5 (2X, ',A,'), :, /,',
82 $ '(15X, 5 (2X, ',A,')))')
83 10000 FORMAT (/, 1X, 'NODAL TIME STEP VARIABLES')
84 10005 FORMAT (1X, 'Nodal ids are Global')
85 10010 FORMAT (1X, 'Row ',I4,', Column ',I1,' is variable ',A)
86 END