Debian Codegraph @

packages/seacas/applications/blot/lnchk.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 LNCHK (PRTOK, OKAY)
9 C=======================================================================
10
11 C --*** LNCHK *** (PATHLN) Check that PATHLINE is a valid program to run
12 C -- Written by Amy Gilkey - revised 05/25/88
13 C --
14 C --LNCHK checks that PATHLINE is a valid program. This is true if
15 C --a mesh is defined (nodes, elements, connectivity, etc.) and
16 C --there are history, global or nodal 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 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 & 'Only a 2D or 3D mesh may be plotted')
43 GOTO 100
44 END IF
45 IF ((NVARHI + NVARGL + NVARNP) .LE. 0) THEN
46 IF (PRTOK) CALL PRTERR ('CMDERR',
47 & 'No non-element variables are defined')
48 GOTO 100
49 END IF
50 IF ((NSTEPS .LE. 0) .OR.
51 & ((NSTEPW .LE. 0) .AND. (NVARHI .LE. 0))) THEN
52 IF (PRTOK) CALL PRTERR ('CMDERR',
53 & 'No time steps with variables are defined')
54 GOTO 100
55 END IF
56
57 C --Write greeting message
58 IF (PRTOK) WRITE (*, 10000)
59
60 OKAY = .TRUE.
61 RETURN
62
63 100 CONTINUE
64 OKAY = .FALSE.
65 RETURN
66 10000 FORMAT (' PATHLINE - a mesh pathline program')
67 END