Debian Codegraph @

packages/seacas/applications/blot/tpmain.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 TPMAIN (A, NEUTRL, NAMES,
9 & NPTIMS, IPTIMS, TIMES, WHOTIM, BLKCOL,
10 & IDELB, MAPEL, MAPND)
11 C=======================================================================
12
13 C --*** TPMAIN *** (TPLOT) TPLOT main plot routine
14 C -- Written by Amy Gilkey - revised 02/29/88
15 C --
16 C --TPMAIN reads the plot variables, and displays the time-history or
17 C --the variable-versus-variable plots.
18 C --
19 C --Parameters:
20 C -- A - IN - the dynamic memory base array
21 C -- NEUTRL - IN - the type of neutral file to write.
22 C -- NAMES - IN - the variable names
23 C -- NPTIMS - IN - the number of selected time steps
24 C -- IPTIMS - IN - the selected time steps
25 C -- TIMES - IN - the database times
26 C -- WHOTIM - IN - true iff whole (versus history) time step
27 C -- BLKCOL - IN/OUT - the user selected colors of the element blocks.
28 C -- BLKCOL(0) = 1 if the user defined material
29 C -- colors should be used in mesh plots.
30 C -- = -1 if program selected colors should
31 C -- be used.
32 C -- BLKCOL(i) = the user selected color of element
33 C -- block i:
34 C -- -2 - no color selected by user.
35 C -- -1 - black
36 C -- 0 - white
37 C -- 1 - red
38 C -- 2 - green
39 C -- 3 - yellow
40 C -- 4 - blue
41 C -- 5 - cyan
42 C -- 6 - magenta
43 C --
44 C --Common Variables:
45 C -- Uses NTPVAR of /TPVARS/
46
47 include 'params.blk'
48
49 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4)
50 C --These parameters define the indices of 2D limit arrays
51
52 include 'dbnums.blk'
53 include 'tpvars.blk'
54
55 DIMENSION A(*)
56 CHARACTER*(*) NAMES(*)
57 INTEGER IPTIMS(NPTIMS)
58 REAL TIMES(*)
59 LOGICAL WHOTIM(*)
60 INTEGER BLKCOL(0:NELBLK)
61 INTEGER IDELB(*)
62 INTEGER MAPEL(*), MAPND(*)
63
64 REAL TIMLIM(2)
65
66 C --Use the selected color table
67 CALL GRCOLU ('ALTERNATE')
68
69 C --Reserve storage for plot variables
70
71 C --*NOTE* PLTVAL(x,NTPVAR+1) holds the time data
72 C -- PLTVAL(x,NTPVAR+2) holds the compressed time data
73 LPLVAR = NPTIMS * NTPVAR
74 L = 0
75 IF (TIMPLT) THEN
76 L = NPTIMS + NPTIMS
77 END IF
78 CALL MDRSRV ('PLTVAL', KPLVAL, LPLVAR + L)
79 CALL MDSTAT (NERR, MEM)
80 IF (NERR .GT. 0) GOTO 100
81
82 C --Read plot variables
83
84 CALL TPREAD (A, NPTIMS, IPTIMS, TIMES, WHOTIM,
85 & A(KPLVAL+LPLVAR), A(KPLVAL))
86
87 CALL MDSTAT (NERR, MEM)
88 IF (NERR .GT. 0) GOTO 100
89
90 C --Compress plot variables
91
92 CALL MDRSRV ('NPTCRV', KNPTS, NTPVAR)
93 CALL MDSTAT (NERR, MEM)
94 IF (NERR .GT. 0) GOTO 100
95
96 CALL SQZTPV (NPTIMS, IPTIMS, WHOTIM, A(KNPTS), A(KPLVAL))
97
98 C --Plot
99
100 TIMLIM(1) = TIMES(IPTIMS(1))
101 TIMLIM(2) = TIMES(IPTIMS(NPTIMS))
102
103 CALL TPPLOT (NEUTRL, NPTIMS, A(KNPTS), TIMLIM, A(KPLVAL),
104 & NAMES, BLKCOL, MAPEL, MAPND)
105
106 CALL MDDEL ('PLTVAL')
107 CALL MDDEL ('NPTCRV')
108
109 100 CONTINUE
110 RETURN
111 END