| 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 SQZTPV (NPTIMS, IPTIMS, WHOTIM, NPTS, PLTVAL) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** SQZTPV *** (TPLOT) Compress curves for whole time steps |
| 12 |
C -- Written by Amy Gilkey - revised 11/11/87 |
| 13 |
C -- |
| 14 |
C --SQZTPV compresses the values for TPLOT curves so that only the values |
| 15 |
C --for whole time steps are in the curve. Curves of history variables |
| 16 |
C --only are left intact. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- NPTIMS - IN - the number of selected time steps |
| 20 |
C -- IPTIMS - IN - the selected time steps |
| 21 |
C -- WHOTIM - IN - true iff whole (versus history) time step |
| 22 |
C -- NPTS - OUT - the number of points on each curve |
| 23 |
C -- PLTVAL - IN/OUT - the plot data; |
| 24 |
C -- PLTVAL(x,NTPVAR+1) holds the times if TIMPLT |
| 25 |
C -- PLTVAL(x,NTPVAR+2) holds the compressed times if TIMPLT and needed |
| 26 |
C -- |
| 27 |
C --Common Variables: |
| 28 |
C -- Uses NTPCRV, NTPVAR, TIMPLT of /TPVARS/ |
| 29 |
|
| 30 |
include 'params.blk' |
| 31 |
include 'tpvars.blk' |
| 32 |
|
| 33 |
INTEGER IPTIMS(*) |
| 34 |
LOGICAL WHOTIM(*) |
| 35 |
INTEGER NPTS(NTPVAR+2) |
| 36 |
REAL PLTVAL(NPTIMS,NTPVAR+2) |
| 37 |
|
| 38 |
CHARACTER TYPX, TYPY |
| 39 |
|
| 40 |
NSQZ = 0 |
| 41 |
NPTIMW = NWHSEL (NPTIMS, IPTIMS, WHOTIM) |
| 42 |
|
| 43 |
IF (TIMPLT) TYPX = 'H' |
| 44 |
N = 0 |
| 45 |
DO 100 NP = 1, NTPCRV |
| 46 |
IF (.NOT. TIMPLT) THEN |
| 47 |
N = N + 1 |
| 48 |
CALL DBVTYP_BL (ITVID(N), TYPX, IDUM) |
| 49 |
END IF |
| 50 |
N = N + 1 |
| 51 |
CALL DBVTYP_BL (ITVID(N), TYPY, IDUM) |
| 52 |
IF ((NPTIMS .NE. NPTIMW) .AND. |
| 53 |
& ((TYPX .NE. 'H') .OR. (TYPY .NE. 'H'))) THEN |
| 54 |
NSQZ = NSQZ + 1 |
| 55 |
IF (.NOT. TIMPLT) THEN |
| 56 |
CALL SQZLGV (NPTIMS, IPTIMS, WHOTIM, |
| 57 |
& PLTVAL(1,N-1), NPTS(N-1), PLTVAL(1,N-1)) |
| 58 |
END IF |
| 59 |
CALL SQZLGV (NPTIMS, IPTIMS, WHOTIM, |
| 60 |
& PLTVAL(1,N), NPTS(N), PLTVAL(1,N)) |
| 61 |
ELSE |
| 62 |
IF (.NOT. TIMPLT) THEN |
| 63 |
NPTS(N-1) = NPTIMS |
| 64 |
END IF |
| 65 |
NPTS(N) = NPTIMS |
| 66 |
END IF |
| 67 |
100 CONTINUE |
| 68 |
|
| 69 |
IF ((NSQZ .GT. 0) .AND. TIMPLT) THEN |
| 70 |
CALL SQZLGV (NPTIMS, IPTIMS, WHOTIM, |
| 71 |
& PLTVAL(1,NTPVAR+1), IDUM, PLTVAL(1,NTPVAR+2)) |
| 72 |
END IF |
| 73 |
|
| 74 |
RETURN |
| 75 |
END |