| 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 DTCOMD (A, INLINE, INVERB, IFLD, INTYP, CFIELD, |
| 9 |
& IFIELD, RFIELD, NEWMOD, NAMES, IELBST, |
| 10 |
& ISSNPS, ISSESS, LIDSP, MAPEL, MAPND, NAMLEN) |
| 11 |
C======================================================================= |
| 12 |
|
| 13 |
C --*** DTCOMD *** (DETOUR) Process DETOUR commands |
| 14 |
C -- Modified by John Glick - 11/1/88 |
| 15 |
C -- Written by Amy Gilkey - revised 05/16/88 |
| 16 |
C -- Dennis Flanagan, 11/18/82 |
| 17 |
C -- |
| 18 |
C --DTCOMD interprets DETOUR commands. |
| 19 |
C -- |
| 20 |
C --The commands are listed below with their parameters and their |
| 21 |
C --function. |
| 22 |
C -- |
| 23 |
C --Display mode control |
| 24 |
C -- newmod |
| 25 |
C -- WIREFRAM Set wireframe mesh mode |
| 26 |
C -- SOLID Set solid mesh mode |
| 27 |
C -- NSETS {id1,...} Set sets mode and select node sets |
| 28 |
C -- SSETS {id1,...} Set sets mode and select side sets |
| 29 |
C -- CONTOUR {variable} Set line contour mode |
| 30 |
C -- PAINT {variable} Set paint contour mode |
| 31 |
C -- VECTOR {2 or 3 variables} Set vector mode |
| 32 |
C -- SYMBOL {type,variable} Set element symbol mode |
| 33 |
C -- GAUSS {4 variables} Set element symbol gauss mode |
| 34 |
C -- variable Select contour variable, and set contour |
| 35 |
C -- range; in vector mode, set the vector |
| 36 |
C -- variables; in symbol mode, set the symbol |
| 37 |
C -- variable |
| 38 |
C -- |
| 39 |
C --Active element control |
| 40 |
C -- newele |
| 41 |
C -- |
| 42 |
C --Contour control |
| 43 |
C -- NCNTRS {ncntrs} Set number of contours, round DELC |
| 44 |
C -- CRANGE {cmin,cmax} Set minimum and maximum contour value |
| 45 |
C -- CMIN {cmin,cmax} Set minimum contour value |
| 46 |
C -- CMAX {cmax} Set maximum contour value |
| 47 |
C -- CSHIFT {cval} Shift contour limits to fall on CVAL |
| 48 |
C -- DELCNTR {delc,cmin} Set contour interval, adjust limits |
| 49 |
C -- CINTV {c1,c2,...} Set specific contour intervals |
| 50 |
C -- |
| 51 |
C --Display control |
| 52 |
C -- COPEN {ON/OFF,ON/OFF} Set contour minimum / maximum open or closed |
| 53 |
C -- CLABEL {OFF/ON/labinc} Label every LABINC interior mesh line |
| 54 |
C -- with contour letter |
| 55 |
C -- CSYMBOLS {maxmin,maxmax} Specify maximum number of min/max symbols |
| 56 |
C -- to plot on contour plots. |
| 57 |
C -- VSCALE {vecscl} Set vector length / symbol scale factor |
| 58 |
C -- color Set number of colors |
| 59 |
C -- spectrum Set number of spectrum colors |
| 60 |
C -- DISPVAR [ADD] {var1,...} Selects history variables, global |
| 61 |
C -- variables, and/or TIME whose values |
| 62 |
C -- will be displayed on the plot legend. |
| 63 |
C -- |
| 64 |
C --Display |
| 65 |
C -- reset Reset default conditions |
| 66 |
C -- postplot Initialize after plot |
| 67 |
C -- initprog Initialize for program change |
| 68 |
C -- initres Initialize for program change and reset |
| 69 |
C -- plot Exit to plot the plot set |
| 70 |
C -- hardcopy Exit to plot the plot set on hardcopy device |
| 71 |
C -- |
| 72 |
C --Information |
| 73 |
C -- show {option} Display program information (based on type) |
| 74 |
C -- help {option} Display system dependent HELP |
| 75 |
C -- |
| 76 |
C --Parameters: |
| 77 |
C -- A - IN - the dynamic memory base array |
| 78 |
C -- INLINE - I/O - the parsed input lines for the log file |
| 79 |
C -- INVERB - I/O - the command verb |
| 80 |
C -- IFLD, |
| 81 |
C -- INTYP, |
| 82 |
C -- CFIELD, |
| 83 |
C -- IFIELD, |
| 84 |
C -- RFIELD - I/O - the free-field reader index and fields |
| 85 |
C -- NEWMOD - IN - the mode status of each view: |
| 86 |
C -- -1 = unchanged |
| 87 |
C -- 0 = changed to default |
| 88 |
C -- n = changed to be like view n |
| 89 |
C -- NAMES - IN - the variable names |
| 90 |
C -- IELBST - IN - the element block status: |
| 91 |
C -- -1 = OFF, 0 = ON, but not selected, 1 = selected |
| 92 |
C -- ISSNPS - I/O - the indices of the selected node sets |
| 93 |
C -- ISSESS - I/O - the indices of the selected side sets |
| 94 |
C -- LIDSP(0:*) - I/O - the indices of the selected variables |
| 95 |
C -- whose values will be displayed on the plot legend. |
| 96 |
C -- LIDSP(0) = the number of variables in the list. |
| 97 |
C -- LIDSP(i) identifies the ith variable in the list. |
| 98 |
C -- LIDSP(i) > 0, LIDSP(i) is the id of a history var. |
| 99 |
C -- LIDSP(i) < 0, -LIDSP(i) is the id of a global var. |
| 100 |
C -- LIDSP(i) = 0, TIME is displayed on the plot legend. |
| 101 |
C -- |
| 102 |
C --Common Variables: |
| 103 |
C -- Uses NELBLK, NVARNP, NVAREL of /DBNUMS/ |
| 104 |
C -- Uses IS3DIM of /D3NUMS/ |
| 105 |
C -- Uses NPTIMS of /TIMES/ |
| 106 |
C -- Sets NTIMIN, HISTOK of /TIMES/ |
| 107 |
C -- Sets VECSCL of /ETCOPT/ |
| 108 |
C -- Sets DEFPRO, DFAC of /DEFORM/ |
| 109 |
C -- Uses DDFAC of /DEFORM/ |
| 110 |
C -- Sets and uses MSHDEF, MSHNUM, MSHLIN, MLNTYP of /MSHOPT/ |
| 111 |
C -- Sets and uses MODDET, MODTYP, IDTVAR, NNDVAR, NEDVAR of /DETOPT/ |
| 112 |
C -- Sets and uses CINTOK, LINCON, NCNTR, CMIN, CMAX, DELC, CINTV, |
| 113 |
C -- NOCMIN, NOCMAX, LABINC, MAXMIN, MAXMAX of /CNTR/ |
| 114 |
|
| 115 |
PARAMETER (MSHNON=0, MSHBOR=1, MSHDIV=2, MSHSEL=3, MSHALL=4) |
| 116 |
PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6) |
| 117 |
|
| 118 |
EXTERNAL BLKDAT |
| 119 |
|
| 120 |
include 'debug.blk' |
| 121 |
C common /debugc/ cdebug |
| 122 |
C common /debugn/ idebug |
| 123 |
C character*8 cdebug |
| 124 |
|
| 125 |
include 'params.blk' |
| 126 |
include 'dbnums.blk' |
| 127 |
include 'dbnumgq.blk' |
| 128 |
include 'd3nums.blk' |
| 129 |
include 'times.blk' |
| 130 |
include 'etcopt.blk' |
| 131 |
include 'deform.blk' |
| 132 |
include 'mshopt.blk' |
| 133 |
include 'detopt.blk' |
| 134 |
include 'cntr.blk' |
| 135 |
|
| 136 |
C Flag for exact contour values for each plot |
| 137 |
include 'icexct.blk' |
| 138 |
include 'axsplt.blk' |
| 139 |
|
| 140 |
DIMENSION A(*) |
| 141 |
CHARACTER*(*) INLINE(*) |
| 142 |
CHARACTER*(*) INVERB |
| 143 |
INTEGER INTYP(*) |
| 144 |
CHARACTER*(*) CFIELD(*) |
| 145 |
INTEGER IFIELD(*) |
| 146 |
REAL RFIELD(*) |
| 147 |
INTEGER NEWMOD(4) |
| 148 |
CHARACTER*(*) NAMES(*) |
| 149 |
INTEGER IELBST(NELBLK) |
| 150 |
INTEGER ISSNPS(NUMNPS,4) |
| 151 |
INTEGER ISSESS(NUMESS,4) |
| 152 |
INTEGER LIDSP(0:*) |
| 153 |
INTEGER MAPEL(*), MAPND(*) |
| 154 |
|
| 155 |
LOGICAL FFNUMB, MATSTR |
| 156 |
INTEGER NUMMOD |
| 157 |
CHARACTER*(MXNAME) VERB, VERB2 |
| 158 |
C --VERB - the command verb used in the SHOW |
| 159 |
C --VERB2 - the secondary SHOW command verb |
| 160 |
|
| 161 |
CHARACTER*(MXNAME) WORD |
| 162 |
LOGICAL HELP |
| 163 |
LOGICAL VWCMD |
| 164 |
LOGICAL ISON |
| 165 |
LOGICAL INL, INE |
| 166 |
CHARACTER TYP |
| 167 |
INTEGER LTYP(-1:1) |
| 168 |
|
| 169 |
LOGICAL FIRST |
| 170 |
SAVE FIRST |
| 171 |
C --FIRST - true iff first time through routine |
| 172 |
|
| 173 |
INTEGER NVOLD(4), NCOLD |
| 174 |
LOGICAL FIXCON |
| 175 |
SAVE NVOLD, NCOLD, FIXCON |
| 176 |
C --NVOLD - the last variables |
| 177 |
C --NCOLD - the last contour variable (for range) |
| 178 |
C --FIXCON - true iff contour parameters are fixed |
| 179 |
REAL FMINC, FMAXC |
| 180 |
SAVE FMINC, FMAXC |
| 181 |
C --FMINC, FMAXC - the minimum and maximum variable values, |
| 182 |
C -- saved to recalculate contour range |
| 183 |
|
| 184 |
CHARACTER*(MXSTLN) CMDTBL(29) |
| 185 |
INTEGER IVWTBL, NVWTBL |
| 186 |
SAVE CMDTBL, IVWTBL, NVWTBL |
| 187 |
C --CMDTBL - the command table |
| 188 |
C --IVWTBL - the VIEW command table starting index |
| 189 |
C --NVWTBL - the number of entries in the VIEW command table |
| 190 |
|
| 191 |
DATA FIRST / .TRUE. / |
| 192 |
|
| 193 |
DATA IVWTBL, NVWTBL / 1, 0 / |
| 194 |
|
| 195 |
C --Command table follows. The "VIEW" entry starts the VIEW |
| 196 |
C --command table, and all VIEW commands (and only these commands) |
| 197 |
C --must follow this entry. The table is ended by a blank entry. |
| 198 |
C --Remember to change the dimensioned size when changing the table. |
| 199 |
C --Lowercase entries are for obsolete commands; they are converted to |
| 200 |
C --uppercase before use. |
| 201 |
DATA CMDTBL / |
| 202 |
1 'NCNTRS ', 'CRANGE ', 'CMIN ', 'CMAX ', |
| 203 |
2 'CSHIFT ', 'DELCNTR ', 'CINTV ', 'CLABEL ', |
| 204 |
3 'lines ', 'COPEN ', 'DISPVAR ', 'opencntr', |
| 205 |
4 'CSYMBOLS', 'minmax ', 'VSCALE ', 'vecscl ', 'CGLOBAL ', |
| 206 |
5 'VIEW ', 'WIREFRAM', 'SOLID ', |
| 207 |
6 'CONTOUR ', 'PAINT ', 'EPAINT ', |
| 208 |
7 'VECTOR ', 'SYMBOL ', 'GAUSS ', |
| 209 |
8 'deform ', 'undeform', |
| 210 |
9 ' ' / |
| 211 |
|
| 212 |
C --Find the command verb, which may be a variable name |
| 213 |
|
| 214 |
WORD = INVERB |
| 215 |
CALL ABRSTR (VERB, WORD, CMDTBL) |
| 216 |
|
| 217 |
IF (VERB .NE. ' ') THEN |
| 218 |
VWCMD = (LOCSTR (VERB, NVWTBL, CMDTBL(IVWTBL)) .GT. 0) |
| 219 |
ELSE |
| 220 |
CALL DBVIX_BL ('N', 1, INV) |
| 221 |
CALL DBVIX_BL ('E', 1, IEV) |
| 222 |
if (inv .gt. 0) then |
| 223 |
inl = LOCSTR (WORD, NVARNP, NAMES(INV)) .GT. 0 |
| 224 |
else |
| 225 |
inl = .FALSE. |
| 226 |
end if |
| 227 |
if (iev .gt. 0) then |
| 228 |
ine = LOCSTR (WORD, NVAREL, NAMES(IEV)) .GT. 0 |
| 229 |
else |
| 230 |
ine = .FALSE. |
| 231 |
end if |
| 232 |
if (inl .or. ine) then |
| 233 |
VERB = ' ' |
| 234 |
VWCMD = .TRUE. |
| 235 |
IFLD = IFLD - 1 |
| 236 |
ELSE |
| 237 |
VERB = WORD |
| 238 |
VWCMD = .FALSE. |
| 239 |
END IF |
| 240 |
END IF |
| 241 |
|
| 242 |
VERB2 = ' ' |
| 243 |
|
| 244 |
C -- CHECK FOR AXIS ONLY PLOTTING |
| 245 |
IF(VERB .EQ. 'plot') THEN |
| 246 |
IF( MATSTR(CFIELD(IFLD),'AXIS', 2)) THEN |
| 247 |
AXONLY = .TRUE. |
| 248 |
END IF |
| 249 |
END IF |
| 250 |
|
| 251 |
C *** Initialization *** |
| 252 |
|
| 253 |
IF ((VERB .EQ. 'postplot') .OR. (VERB .EQ. 'initprog') |
| 254 |
& .OR. (VERB .EQ. 'initres') .OR. (VERB .EQ. 'reset')) THEN |
| 255 |
INVERB = VERB |
| 256 |
|
| 257 |
C --Initialize parameters first time through, then reset |
| 258 |
|
| 259 |
IF (FIRST) THEN |
| 260 |
|
| 261 |
C --Change the command table to upper case |
| 262 |
|
| 263 |
L = LOCSTR (' ', 999, CMDTBL) - 1 |
| 264 |
DO 100 I = 1, L |
| 265 |
CALL EXUPCS (CMDTBL(I)) |
| 266 |
100 CONTINUE |
| 267 |
|
| 268 |
C --Find the starting entry in the VIEW table |
| 269 |
|
| 270 |
IVWTBL = LOCSTR ('VIEW', 999, CMDTBL) |
| 271 |
NVWTBL = LOCSTR (' ', 999, CMDTBL(IVWTBL)) - 1 |
| 272 |
|
| 273 |
VERB = 'initres' |
| 274 |
END IF |
| 275 |
|
| 276 |
C --Initialize time step selection default |
| 277 |
|
| 278 |
IF ((VERB .EQ. 'initprog') .OR. (VERB .EQ. 'initres')) THEN |
| 279 |
|
| 280 |
C --Set default time step selection to 10 times with delta interval |
| 281 |
|
| 282 |
HISTOK = .FALSE. |
| 283 |
NTIMIN = 10 |
| 284 |
END IF |
| 285 |
|
| 286 |
C --Initialize for program change |
| 287 |
|
| 288 |
IF (VERB .EQ. 'initprog') THEN |
| 289 |
|
| 290 |
C --Set default magnification factor |
| 291 |
|
| 292 |
DEFPRO = .TRUE. |
| 293 |
IF (DFAC .EQ. 0.0) DFAC = DDFAC |
| 294 |
CALL SCALAX |
| 295 |
|
| 296 |
C --Set deformed wireframe mode on all views |
| 297 |
|
| 298 |
CALL INIINT (3, 1, LTYP) |
| 299 |
CALL SETMSH (0, 'DEFORM', 'NONE', MSHSEL, LTYP, |
| 300 |
& 0, IDUM, 0, IDUM, 'WIREFRAM', ' ', ISSNPS, ISSESS) |
| 301 |
END IF |
| 302 |
|
| 303 |
C --Reset parameters |
| 304 |
|
| 305 |
IF ((VERB .EQ. 'reset') .OR. (VERB .EQ. 'initres')) THEN |
| 306 |
|
| 307 |
IF (VERB .EQ. 'reset') THEN |
| 308 |
C --Set list of display variables |
| 309 |
CALL DISPV (.TRUE., INLINE, IFLD, INTYP, |
| 310 |
& CFIELD, NAMES, LIDSP, NAMLEN) |
| 311 |
ENDIF |
| 312 |
|
| 313 |
C --Set default magnification factor |
| 314 |
|
| 315 |
DEFPRO = .TRUE. |
| 316 |
IF (DFAC .EQ. 0.0) DFAC = DDFAC |
| 317 |
CALL SCALAX |
| 318 |
|
| 319 |
C --Set wireframe on all defined views |
| 320 |
|
| 321 |
CALL INIINT (3, 1, LTYP) |
| 322 |
CALL SETMSH (0, 'DEFORM', 'NONE', MSHSEL, LTYP, |
| 323 |
& 0, IDUM, 0, IDUM, 'WIREFRAM', ' ', ISSNPS, ISSESS) |
| 324 |
|
| 325 |
CALL INIINT (4, 0, IDTVAR) |
| 326 |
CALL INIINT (4, 0, NVOLD) |
| 327 |
|
| 328 |
NCOLD = 0 |
| 329 |
FIXCON = .FALSE. |
| 330 |
CINTOK = .FALSE. |
| 331 |
CALL INIREA (256, 0.0, CINTV) |
| 332 |
LINCON = .TRUE. |
| 333 |
NCNTR = 6 |
| 334 |
CMIN = 0.0 |
| 335 |
CMAX = 0.0 |
| 336 |
DELC = 0.0 |
| 337 |
|
| 338 |
C --Set display options |
| 339 |
|
| 340 |
LABINC = 0 |
| 341 |
NOCMIN = .FALSE. |
| 342 |
NOCMAX = .FALSE. |
| 343 |
MAXMIN = 10 |
| 344 |
MAXMAX = 10 |
| 345 |
|
| 346 |
VECSCL = 1.0 |
| 347 |
|
| 348 |
FIRST = .FALSE. |
| 349 |
END IF |
| 350 |
|
| 351 |
C --Initialize for new plot set |
| 352 |
|
| 353 |
IF (VERB .EQ. 'postplot') THEN |
| 354 |
CONTINUE |
| 355 |
END IF |
| 356 |
|
| 357 |
VERB = ' ' |
| 358 |
|
| 359 |
C *** Display mode control *** |
| 360 |
|
| 361 |
ELSE IF (VWCMD) THEN |
| 362 |
INVERB = ' ' |
| 363 |
|
| 364 |
C --Set up the view number |
| 365 |
CALL CMDVWC (VERB, INLINE, |
| 366 |
& IFLD, INTYP, CFIELD, IFIELD, RFIELD, |
| 367 |
& IVIEW, JVIEW, *150) |
| 368 |
|
| 369 |
IF (VERB .NE. ' ') THEN |
| 370 |
WORD = VERB |
| 371 |
CALL ABRSTR (VERB, WORD, CMDTBL(IVWTBL)) |
| 372 |
IF (VERB .EQ. ' ') THEN |
| 373 |
IF ((LOCSTR (WORD, NVARNP, NAMES(INV)) .GT. 0) |
| 374 |
& .OR. (LOCSTR (WORD, NVAREL, NAMES(IEV)) .GT. 0)) THEN |
| 375 |
VERB = ' ' |
| 376 |
IFLD = IFLD - 1 |
| 377 |
ELSE |
| 378 |
VERB = 'VIEW' |
| 379 |
CALL PRTERR ('CMDERR', |
| 380 |
& 'Expected view-dependent command') |
| 381 |
GOTO 150 |
| 382 |
END IF |
| 383 |
END IF |
| 384 |
END IF |
| 385 |
|
| 386 |
CALL CMDMOD (VERB, VERB2, INLINE(1), |
| 387 |
& IFLD, INTYP, CFIELD, IFIELD, RFIELD, |
| 388 |
& IVIEW, JVIEW, NAMES, NVOLD, NCOLD, FIXCON, VECSCL, |
| 389 |
& ISSNPS, ISSESS, *150) |
| 390 |
|
| 391 |
ELSE IF (VERB .EQ. 'newmod') THEN |
| 392 |
INVERB = ' ' |
| 393 |
|
| 394 |
ISON = .FALSE. |
| 395 |
DO 110 I = 1, 4 |
| 396 |
IF (NEWMOD(I) .LT. 0) THEN |
| 397 |
CONTINUE |
| 398 |
ELSE IF (NEWMOD(I) .EQ. 0) THEN |
| 399 |
ISON = .TRUE. |
| 400 |
IF ((MSHDEF(I) .EQ. 'NONE') |
| 401 |
& .OR. (MSHDEF(I) .EQ. 'EMPTY')) THEN |
| 402 |
CALL SETMOD (I, 'NONE', ' ') |
| 403 |
ELSE |
| 404 |
CALL SETMOD (I, 'WIREFRAM', ' ') |
| 405 |
END IF |
| 406 |
ELSE |
| 407 |
ISON = .TRUE. |
| 408 |
J = NEWMOD(I) |
| 409 |
IF ((MSHDEF(J) .EQ. 'NONE') |
| 410 |
& .OR. (MSHDEF(J) .EQ. 'EMPTY')) THEN |
| 411 |
CALL SETMOD (I, 'NONE', ' ') |
| 412 |
ELSE |
| 413 |
CALL SETMOD (I, MODDET(J), MODTYP(J)) |
| 414 |
END IF |
| 415 |
END IF |
| 416 |
110 CONTINUE |
| 417 |
|
| 418 |
VERB = ' ' |
| 419 |
IF (ISON) VERB = 'PLOT' |
| 420 |
VWCMD = .TRUE. |
| 421 |
|
| 422 |
ELSE IF (VERB .EQ. 'newele') THEN |
| 423 |
INVERB = ' ' |
| 424 |
|
| 425 |
VERB = ' ' |
| 426 |
VWCMD = .TRUE. |
| 427 |
|
| 428 |
C --Force all element variables to be re-scaled |
| 429 |
DO 120 I = 1, 4 |
| 430 |
CALL DBVTYP_BL (IDTVAR(I), TYP, IDUM) |
| 431 |
IF (TYP .EQ. 'E') NVOLD(I) = 0 |
| 432 |
120 CONTINUE |
| 433 |
|
| 434 |
C --Force the contour range to be re-calculated (if element variable) |
| 435 |
CALL DBVTYP_BL (IDTVAR(1), TYP, IDUM) |
| 436 |
IF ((.NOT. FIXCON) .AND. (TYP .EQ. 'E')) NCOLD = 0 |
| 437 |
|
| 438 |
C *** Contour control *** |
| 439 |
|
| 440 |
ELSE IF ((VERB .EQ. 'NCNTRS') .OR. (VERB .EQ. 'CRANGE') |
| 441 |
& .OR. (VERB .EQ. 'CMIN') .OR. (VERB .EQ. 'CMAX') |
| 442 |
& .OR. (VERB .EQ. 'CSHIFT') .OR. (VERB .EQ. 'DELCNTR') |
| 443 |
& .OR. (VERB .EQ. 'CINTV')) THEN |
| 444 |
INVERB = ' ' |
| 445 |
|
| 446 |
CALL CMDCON (VERB, INLINE(1), IFLD, INTYP, |
| 447 |
& IFIELD, RFIELD, *150) |
| 448 |
|
| 449 |
C --Fix the contour type |
| 450 |
FIXCON = .TRUE. |
| 451 |
IEXCON=0 |
| 452 |
|
| 453 |
ELSE IF (VERB .EQ. 'CGLOBAL')THEN |
| 454 |
C CGLOBAL toggles the flag for using the globally defined contours |
| 455 |
C or setting to contour limits to the exact (plus/minus epsilon) |
| 456 |
C values for the plot being drawn |
| 457 |
IF(IEXCON.EQ.0)THEN |
| 458 |
IEXCON=1 |
| 459 |
CALL PRTERR('CMDSPEC','Using exact contour values' |
| 460 |
& //' for each plot.') |
| 461 |
ELSEIF(IEXCON.EQ.1)THEN |
| 462 |
CALL PRTERR('CMDSPEC','Using global contour values' |
| 463 |
& //' for each plot.') |
| 464 |
IEXCON=0 |
| 465 |
ENDIF |
| 466 |
INVERB = ' ' |
| 467 |
|
| 468 |
C *** Display control *** |
| 469 |
|
| 470 |
ELSE IF (VERB .EQ. 'DISPVAR') THEN |
| 471 |
CALL FFADDC (VERB, INLINE(1)) |
| 472 |
CALL DISPV (.FALSE., INLINE, IFLD, INTYP, |
| 473 |
& CFIELD, NAMES, LIDSP, NAMLEN) |
| 474 |
INVERB = ' ' |
| 475 |
|
| 476 |
ELSE IF ((VERB .EQ. 'CLABEL') .or. (verb .eq. 'LINES')) THEN |
| 477 |
if (verb .eq. 'LINES') then |
| 478 |
call prterr ('CMDREQ', 'Please use the CLABEL command') |
| 479 |
verb = 'CLABEL' |
| 480 |
end if |
| 481 |
CALL FFADDC (VERB, INLINE(1)) |
| 482 |
|
| 483 |
INVERB = ' ' |
| 484 |
|
| 485 |
IF (FFNUMB (IFLD, INTYP)) THEN |
| 486 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 487 |
& 'labeling density', 0, LABINC, *150) |
| 488 |
CALL FFADDI (LABINC, INLINE(1)) |
| 489 |
ELSE |
| 490 |
CALL FFCHAR (IFLD, INTYP, CFIELD, 'ON', WORD) |
| 491 |
IF (MATSTR (WORD, 'ON', 2)) THEN |
| 492 |
CALL FFADDC ('ON', INLINE(1)) |
| 493 |
LABINC = 0 |
| 494 |
ELSE IF (MATSTR (WORD, 'OFF', 3)) THEN |
| 495 |
CALL FFADDC ('OFF', INLINE(1)) |
| 496 |
LABINC = -1 |
| 497 |
ELSE |
| 498 |
CALL PRTERR ('CMDERR', |
| 499 |
& 'Expected "ON", "OFF" or contour labeling density') |
| 500 |
GOTO 150 |
| 501 |
END IF |
| 502 |
END IF |
| 503 |
|
| 504 |
ELSE IF ((VERB .EQ. 'COPEN') .or. (verb .eq. 'OPENCNTR')) THEN |
| 505 |
if (verb .eq. 'OPENCNTR') then |
| 506 |
call prterr ('CMDREQ', 'Please use the command COPEN') |
| 507 |
verb = 'COPEN' |
| 508 |
end if |
| 509 |
|
| 510 |
CALL FFADDC (VERB, INLINE(1)) |
| 511 |
INVERB = ' ' |
| 512 |
|
| 513 |
CALL FFONOF (IFLD, INTYP, CFIELD, NOCMIN, *150) |
| 514 |
CALL FFADDO (NOCMIN, INLINE(1)) |
| 515 |
CALL FFONOF (IFLD, INTYP, CFIELD, NOCMAX, *150) |
| 516 |
CALL FFADDO (NOCMAX, INLINE(1)) |
| 517 |
|
| 518 |
ELSE IF ((VERB .EQ. 'CSYMBOLS') .or. (verb .eq. 'MINMAX')) THEN |
| 519 |
if (verb .eq. 'MINMAX') then |
| 520 |
call prterr ('CMDREQ', 'Please use the command CSYMBOLS') |
| 521 |
verb = 'CSYMBOLS' |
| 522 |
end if |
| 523 |
|
| 524 |
CALL FFADDC (VERB, INLINE(1)) |
| 525 |
INVERB = ' ' |
| 526 |
|
| 527 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 528 |
& 'maximum number of minimums', 10, MM, *150) |
| 529 |
CALL FFADDI (MM, INLINE(1)) |
| 530 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 531 |
& 'maximum number of maximums', MM, MAXMAX, *150) |
| 532 |
CALL FFADDI (MAXMAX, INLINE(1)) |
| 533 |
MAXMIN = MM |
| 534 |
|
| 535 |
ELSE IF ((VERB .EQ. 'VSCALE') .or. (VERB .EQ. 'VECSCL')) THEN |
| 536 |
if (verb .eq. 'VECSCL') then |
| 537 |
call prterr ('CMDREQ', 'Please use the command VSCALE') |
| 538 |
verb = 'VSCALE' |
| 539 |
end if |
| 540 |
|
| 541 |
CALL FFADDC (VERB, INLINE(1)) |
| 542 |
INVERB = ' ' |
| 543 |
|
| 544 |
CALL FFREAL (IFLD, INTYP, RFIELD, |
| 545 |
& 'vector/symbol scale factor', 1.0, VECSCL, *150) |
| 546 |
CALL FFADDR (VECSCL, INLINE(1)) |
| 547 |
|
| 548 |
ELSE IF ((VERB .EQ. 'color') .OR. (VERB .EQ. 'spectrum')) THEN |
| 549 |
VERB = ' ' |
| 550 |
|
| 551 |
C --Reset the number of contours when the colors change |
| 552 |
|
| 553 |
IF (.NOT. CINTOK) THEN |
| 554 |
NCOL = 0 |
| 555 |
IF (VERB .EQ. 'color') THEN |
| 556 |
DO 130 IDEV = 1, 2 |
| 557 |
CALL GRGPARD ('DEVICE', IDEV, ISON, WORD) |
| 558 |
IF (ISON) THEN |
| 559 |
CALL GRGPAR ('SPECTRUM', IDEV, IFIELD, WORD) |
| 560 |
IF (IFIELD(3) .GT. 0) NCOL = -999 |
| 561 |
END IF |
| 562 |
130 CONTINUE |
| 563 |
END IF |
| 564 |
IF (NCOL .EQ. 0) THEN |
| 565 |
DO 140 IDEV = 1, 2 |
| 566 |
CALL GRGPARD ('DEVICE', IDEV, ISON, WORD) |
| 567 |
IF (ISON) THEN |
| 568 |
CALL GRGPAR ('SPECTRUM', IDEV, IFIELD, WORD) |
| 569 |
NCOL = MAX (NCOL, IFIELD(1)) |
| 570 |
END IF |
| 571 |
140 CONTINUE |
| 572 |
END IF |
| 573 |
IF ((NCOL .GT. 0) .AND. (NCNTR .NE. NCOL)) THEN |
| 574 |
NCNTR = NCOL |
| 575 |
IF (NCNTR .GE. 256) THEN |
| 576 |
CALL PRTERR ('CMDWARN', |
| 577 |
& 'Number of contours reduced to 255') |
| 578 |
NCNTR = 255 |
| 579 |
END IF |
| 580 |
IF (.NOT. FIXCON) THEN |
| 581 |
VWCMD = .TRUE. |
| 582 |
NCOLD = 0 |
| 583 |
ELSE |
| 584 |
CALL ADJCON (.FALSE.) |
| 585 |
VERB = 'NCNTRS' |
| 586 |
END IF |
| 587 |
END IF |
| 588 |
END IF |
| 589 |
|
| 590 |
ELSE IF ((VERB .EQ. 'plot') .OR. (VERB .EQ. 'hardcopy')) THEN |
| 591 |
|
| 592 |
IF (NPTIMS .LE. 0) THEN |
| 593 |
CALL PRTERR ('CMDERR', 'No times are selected') |
| 594 |
VERB = ' ' |
| 595 |
GOTO 150 |
| 596 |
END IF |
| 597 |
CALL CHKVAR (MODDET, MODTYP, -999, IDTVAR, NVOLD, |
| 598 |
& NNDVAR, NEDVAR, ISON) |
| 599 |
IF (.NOT. ISON) THEN |
| 600 |
VERB = 'PLOT' |
| 601 |
GOTO 150 |
| 602 |
END IF |
| 603 |
|
| 604 |
VERB = ' ' |
| 605 |
|
| 606 |
C *** Information *** |
| 607 |
|
| 608 |
ELSE IF (VERB .EQ. 'show') THEN |
| 609 |
VERB = ' ' |
| 610 |
|
| 611 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 612 |
IF ((WORD .NE. 'PLOT') .AND. (WORD .NE. 'HARDCOPY') |
| 613 |
& .AND. (WORD .NE. 'VIEW')) THEN |
| 614 |
CALL ABRSTR (VERB, WORD, CMDTBL) |
| 615 |
ELSE |
| 616 |
VERB = WORD |
| 617 |
END IF |
| 618 |
IF (VERB .NE. ' ') THEN |
| 619 |
CALL DTSHOW (VERB, NAMES, LIDSP) |
| 620 |
INVERB = ' ' |
| 621 |
END IF |
| 622 |
VERB = ' ' |
| 623 |
|
| 624 |
ELSE IF (VERB .EQ. 'help') THEN |
| 625 |
VERB = ' ' |
| 626 |
|
| 627 |
ISON = HELP ('BLOT', 'COMMANDS', CFIELD(IFLD)) |
| 628 |
IF (.NOT. ISON) THEN |
| 629 |
CALL SHOCMD ('DETOUR Commands', CMDTBL) |
| 630 |
END IF |
| 631 |
|
| 632 |
ELSE |
| 633 |
VERB = ' ' |
| 634 |
END IF |
| 635 |
|
| 636 |
GOTO 160 |
| 637 |
|
| 638 |
150 CONTINUE |
| 639 |
INLINE(1) = ' ' |
| 640 |
|
| 641 |
160 CONTINUE |
| 642 |
IF (VERB .NE. ' ') THEN |
| 643 |
CALL DTSHOW (VERB, NAMES, LIDSP) |
| 644 |
ELSE |
| 645 |
VERB2 = ' ' |
| 646 |
END IF |
| 647 |
|
| 648 |
IF (VWCMD) THEN |
| 649 |
|
| 650 |
C --Scale requested variable |
| 651 |
|
| 652 |
NNEDVAR = MAX (NNDVAR, NEDVAR) |
| 653 |
|
| 654 |
DO 170 IVAR = 1, NNEDVAR |
| 655 |
IF (IDTVAR(IVAR) .NE. NVOLD(IVAR)) THEN |
| 656 |
IF (IDTVAR(IVAR) .EQ. 0) THEN |
| 657 |
FMIN = 0.0 |
| 658 |
FMAX = 0.0 |
| 659 |
ELSE |
| 660 |
CALL SCALER (A, A, 1, NAMES(IDTVAR(IVAR)), |
| 661 |
* IDTVAR(IVAR), |
| 662 |
& .TRUE., IELBST, NALVAR, FMIN, FMAX, MAPEL, MAPND) |
| 663 |
END IF |
| 664 |
|
| 665 |
IF (IVAR .EQ. 1) THEN |
| 666 |
FMINC = FMIN |
| 667 |
FMAXC = FMAX |
| 668 |
END IF |
| 669 |
|
| 670 |
NVOLD(IVAR) = IDTVAR(IVAR) |
| 671 |
END IF |
| 672 |
170 CONTINUE |
| 673 |
|
| 674 |
C --Compute contour range, if changed |
| 675 |
|
| 676 |
IF (((NUMMOD (MODDET, ' ', 'CONTOUR', ' ') .GE. 1) |
| 677 |
& .OR. (NUMMOD (MODDET, ' ', 'ELEMCONT', ' ') .GE. 1)) |
| 678 |
& .AND. (IDTVAR(1) .GT. 0)) THEN |
| 679 |
ISON = (NUMMOD (MODDET, MODTYP, 'CONTOUR', 'LINE') .GE. 1) |
| 680 |
& .OR. (NUMMOD (MODDET, MODTYP, 'ELEMCONT', 'LINE') .GE. 1) |
| 681 |
IF ((IDTVAR(1) .NE. NCOLD) .OR. |
| 682 |
& ((.NOT. FIXCON) .AND. (ISON .NEQV. LINCON))) THEN |
| 683 |
C --Recompute and display contour parameters |
| 684 |
CINTOK = .FALSE. |
| 685 |
CALL CONRNG (ISON, FMINC, FMAXC, NCNTR, DELC, CMIN, CMAX) |
| 686 |
NCOLD = IDTVAR(1) |
| 687 |
LINCON = ISON |
| 688 |
IF (VERB2 .EQ. ' ') VERB2 = 'CMIN' |
| 689 |
ELSE IF (ISON .NEQV. LINCON) THEN |
| 690 |
C --Recompute CMAX for current parameters if changed from |
| 691 |
C --line to painted contours |
| 692 |
LINCON = ISON |
| 693 |
CALL ADJCON (.TRUE.) |
| 694 |
END IF |
| 695 |
END IF |
| 696 |
END IF |
| 697 |
|
| 698 |
IF (VERB2 .NE. ' ') THEN |
| 699 |
CALL DTSHOW (VERB2, NAMES, LIDSP) |
| 700 |
END IF |
| 701 |
|
| 702 |
RETURN |
| 703 |
END |