Debian Codegraph @

packages/seacas/applications/blot/spchk.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 SPCHK (PRTOK, OKAY)
9 C=======================================================================
10
11 C --*** SPCHK *** (SPLOT) Check that SPLOT is a valid program to run
12 C -- Written by Amy Gilkey - revised 11/03/87
13 C --
14 C --SPCHK checks that SPLOT is a valid program. This is true if
15 C --a mesh is defined (nodes, elements, connectivity, etc.) and
16 C --there are nodal or element variables in the database.
17 C --
18 C --If the program is valid, a welcome message is printed.
19 C --
20 C --Parameters:
21 C -- PRTOK - IN - if true, print error messages and welcome messages,
22 C -- if false, check but do not print anything
23 C -- OKAY - OUT - true iff the program is valid
24 C --
25 C --Common Variables:
26 C -- Uses NDIM, NUMNP, NUMEL, NVARNP, NVAREL, NSTEPW of /DBNUMS/
27
28 include 'dbnums.blk'
29
30 LOGICAL PRTOK
31 LOGICAL OKAY
32
33 C --Check header information from database
34
35 IF ((NUMNP .LE. 0) .OR. (NUMEL .LE. 0) .OR. (NDIM .LE. 0)) THEN
36 IF (PRTOK) CALL PRTERR ('CMDERR',
37 & 'No mesh is defined')
38 GOTO 100
39 END IF
40 IF ((NDIM .NE. 2) .AND. (NDIM .NE. 3)) THEN
41 IF (PRTOK) CALL PRTERR ('CMDERR',
42 & 'SPLOT can only process 2D and 3D meshes')
43 GOTO 100
44 END IF
45 IF ((NVARNP + NVAREL) .LE. 0) THEN
46 IF (PRTOK) CALL PRTERR ('CMDERR',
47 & 'No nodal or element variables are defined')
48 GOTO 100
49 END IF
50 IF (NSTEPW .LE. 0) THEN
51 IF (PRTOK) CALL PRTERR ('CMDERR',
52 & 'No time steps with nodal or element variables are defined')
53 GOTO 100
54 END IF
55
56 C --Write greeting message
57 IF (PRTOK) WRITE (*, 10000)
58
59 OKAY = .TRUE.
60 RETURN
61
62 100 CONTINUE
63 OKAY = .FALSE.
64 RETURN
65 10000 FORMAT (' SPLOT - a distance-versus-variable curve plot program')
66 END