| 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 TPCHK (PRTOK, OKAY) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** TPCHK *** (TPLOT) Check that TPLOT is a valid program to run |
| 12 |
C -- Written by Amy Gilkey - revised 11/03/87 |
| 13 |
C -- |
| 14 |
C --TPCHK checks that TPLOT is a valid program. This is true if |
| 15 |
C --there are history, global, nodal or element variables in the database. |
| 16 |
C -- |
| 17 |
C --If the program is valid, a welcome message is printed. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- PRTOK - IN - if true, print error messages and welcome messages, |
| 21 |
C -- if false, check but do not print anything |
| 22 |
C -- OKAY - OUT - true iff the program is valid |
| 23 |
C -- |
| 24 |
C --Common Variables: |
| 25 |
C -- Uses NVARHI, NVARGL, NVARNP, NVAREL, NSTEPS, NSTEPW of /DBNUMS/ |
| 26 |
|
| 27 |
include 'dbnums.blk' |
| 28 |
|
| 29 |
LOGICAL PRTOK |
| 30 |
LOGICAL OKAY |
| 31 |
|
| 32 |
C --Check header information from database |
| 33 |
|
| 34 |
IF ((NVARHI + NVARGL + NVARNP + NVAREL) .LE. 0) THEN |
| 35 |
IF (PRTOK) CALL PRTERR ('CMDERR', |
| 36 |
& 'No variables are defined') |
| 37 |
GOTO 100 |
| 38 |
END IF |
| 39 |
IF ((NSTEPS .LE. 0) .OR. |
| 40 |
& ((NSTEPW .LE. 0) .AND. (NVARHI .LE. 0))) THEN |
| 41 |
IF (PRTOK) CALL PRTERR ('CMDERR', |
| 42 |
& 'No time steps with variables are defined') |
| 43 |
GOTO 100 |
| 44 |
END IF |
| 45 |
|
| 46 |
C --Write greeting message |
| 47 |
IF (PRTOK) WRITE (*, 10000) |
| 48 |
|
| 49 |
OKAY = .TRUE. |
| 50 |
RETURN |
| 51 |
|
| 52 |
100 CONTINUE |
| 53 |
OKAY = .FALSE. |
| 54 |
RETURN |
| 55 |
10000 FORMAT (' TPLOT - a time history or X-Y plot program') |
| 56 |
END |