| 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 |
C======================================================================= |
| 7 |
SUBROUTINE RDMMAX (IFLD, INTYP, CFIELD, |
| 8 |
& NAMIGV, NAMINV, NAMIEV, |
| 9 |
& NAMOGV, NAMONV, NAMOEV, |
| 10 |
& NSTEP, MMSTEP, MMNAME, MMTYP, MMVAR, MMNUM, *) |
| 11 |
C======================================================================= |
| 12 |
|
| 13 |
C --*** RDMMAX *** (EXPLORE) Parse the MINMAX command parameters |
| 14 |
C -- |
| 15 |
C --RDMMAX parses the MINMAX command parameters. It first reads |
| 16 |
C --the name, if any, and determines its type and variable number. |
| 17 |
C --It then reads the 'ALL' versus 'THIS' parameter. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- IFLD - IN/OUT - the number of the next entry to scan, incremented |
| 21 |
C -- INTYP - IN - the free-format field types |
| 22 |
C -- -1 = none, 0 = name, 1 = real, 2 = integer |
| 23 |
C -- CFIELD - IN - the input character fields |
| 24 |
C -- NAMIGV - IN - the names of the global variables as input |
| 25 |
C -- NAMINV - IN - the names of the nodal variables as input |
| 26 |
C -- NAMIEV - IN - the names of the element variables as input |
| 27 |
C -- NAMOGV - IN - the names of the global variables for comparison |
| 28 |
C -- NAMONV - IN - the names of the nodal variables for comparison |
| 29 |
C -- NAMOEV - IN - the names of the element variables for comparison |
| 30 |
C -- NSTEP - IN - the current step number |
| 31 |
C -- MMSTEP - IN/OUT - the requested step number, <=0 for all |
| 32 |
C -- MMNAME - IN/OUT - min/max variable name |
| 33 |
C -- MMTYP - IN/OUT - min/max variable type: |
| 34 |
C -- 'G'lobal, 'N'odal, 'E'lement |
| 35 |
C -- MMVAR - IN/OUT - min/max variable number |
| 36 |
C -- MMNUM - IN/OUT - number of sequential min/max requests for this |
| 37 |
C -- variable |
| 38 |
C -- * - return statement if invalid range of integers specified; |
| 39 |
C -- message printed |
| 40 |
C -- |
| 41 |
C --Common Variables: |
| 42 |
C -- Uses NVARNP, NVAREL, NVARGL of /DBNUMS/ |
| 43 |
|
| 44 |
include 'exodusII.inc' |
| 45 |
include 'exp_dbnums.blk' |
| 46 |
|
| 47 |
INTEGER INTYP(*) |
| 48 |
CHARACTER*(*) CFIELD(*) |
| 49 |
CHARACTER*(*) NAMIGV(*), NAMINV(*), NAMIEV(*) |
| 50 |
CHARACTER*(*) NAMOGV(*), NAMONV(*), NAMOEV(*) |
| 51 |
CHARACTER*(*) MMNAME |
| 52 |
CHARACTER MMTYP |
| 53 |
|
| 54 |
CHARACTER*(256) NAME, WORD |
| 55 |
CHARACTER CH |
| 56 |
|
| 57 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', NAME) |
| 58 |
|
| 59 |
IF (NAME .NE. ' ') THEN |
| 60 |
|
| 61 |
C --Get the variable name |
| 62 |
|
| 63 |
IV = LOCSTR (NAME, NVARGL, NAMOGV) |
| 64 |
IF (IV .GT. 0) THEN |
| 65 |
CH = 'G' |
| 66 |
NAME = NAMIGV(IV) |
| 67 |
ELSE |
| 68 |
IV = LOCSTR (NAME, NVARNP, NAMONV) |
| 69 |
IF (IV .GT. 0) THEN |
| 70 |
CH = 'N' |
| 71 |
NAME = NAMINV(IV) |
| 72 |
ELSE |
| 73 |
IV = LOCSTR (NAME, NVAREL, NAMOEV) |
| 74 |
IF (IV .GT. 0) THEN |
| 75 |
CH = 'E' |
| 76 |
NAME = NAMIEV(IV) |
| 77 |
END IF |
| 78 |
END IF |
| 79 |
END IF |
| 80 |
IF (IV .LE. 0) THEN |
| 81 |
CALL PRTERR ('CMDERR', 'Expected variable name') |
| 82 |
GOTO 100 |
| 83 |
END IF |
| 84 |
|
| 85 |
C --Get the ALL (versus this time step) field |
| 86 |
|
| 87 |
CALL FFCHAR (IFLD, INTYP, CFIELD, 'THIS', WORD) |
| 88 |
IF (WORD .EQ. 'ALL') THEN |
| 89 |
MMSTEP = 0 |
| 90 |
ELSE IF (WORD .EQ. 'THIS') THEN |
| 91 |
MMSTEP = NSTEP |
| 92 |
ELSE |
| 93 |
CALL PRTERR ('CMDERR', 'Expected "ALL" or "THIS"') |
| 94 |
GOTO 100 |
| 95 |
END IF |
| 96 |
|
| 97 |
MMNAME = NAME |
| 98 |
MMVAR = IV |
| 99 |
MMTYP = CH |
| 100 |
MMNUM = 1 |
| 101 |
ELSE |
| 102 |
|
| 103 |
C --Get next min/max for last variable |
| 104 |
|
| 105 |
IF (MMVAR .EQ. 0) THEN |
| 106 |
CALL PRTERR ('CMDERR', 'Expected variable name') |
| 107 |
GOTO 100 |
| 108 |
END IF |
| 109 |
END IF |
| 110 |
|
| 111 |
RETURN |
| 112 |
|
| 113 |
100 CONTINUE |
| 114 |
RETURN 1 |
| 115 |
END |