| 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 DTCHK (PRTOK, OKAY) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** DTCHK *** (DETOUR) Check that DETOUR is a valid program to run |
| 12 |
C -- Written by Amy Gilkey - revised 10/23/87 |
| 13 |
C -- |
| 14 |
C --DTCHK checks that DETOUR is a valid program. This is true if |
| 15 |
C --a mesh is defined (nodes, elements, connectivity, etc.). |
| 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 NDIM, NUMNP, NUMEL 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 ((NUMNP .LE. 0) .OR. (NUMEL .LE. 0) .OR. (NDIM .LE. 0)) THEN |
| 35 |
IF (PRTOK) CALL PRTERR ('CMDERR', |
| 36 |
& 'No mesh is defined') |
| 37 |
GOTO 100 |
| 38 |
END IF |
| 39 |
IF ((NDIM .NE. 2) .AND. (NDIM .NE. 3)) THEN |
| 40 |
IF (PRTOK) CALL PRTERR ('CMDERR', |
| 41 |
& 'Only a 2D or 3D mesh may be plotted') |
| 42 |
GOTO 100 |
| 43 |
END IF |
| 44 |
|
| 45 |
C --Write greeting message |
| 46 |
IF (PRTOK) WRITE (*, 10000) |
| 47 |
|
| 48 |
OKAY = .TRUE. |
| 49 |
RETURN |
| 50 |
|
| 51 |
100 CONTINUE |
| 52 |
OKAY = .FALSE. |
| 53 |
RETURN |
| 54 |
10000 FORMAT (' DETOUR - a deformed mesh and contour plot program') |
| 55 |
END |