| 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 COMAND (A, INLINE, INTYP, CFIELD, IFIELD, RFIELD, |
| 8 |
& NAMECO, BLKTYP, NAMES, TIMES, IPTIMS, |
| 9 |
& IDELB, VISELB, SELELB, |
| 10 |
& QAREC, INFREC, RETVRB, MERR) |
| 11 |
C======================================================================= |
| 12 |
C --*** COMAND *** (ALGEBRA) Process command |
| 13 |
C -- Written by Amy Gilkey - revised 05/18/88 |
| 14 |
C -- |
| 15 |
C --COMAND processes an ALGEBRA command. The commands are: |
| 16 |
C -- |
| 17 |
C -- TITLE Change database title |
| 18 |
C -- |
| 19 |
C -- SAVE {N,E,G,A,var,...} Save input database variable |
| 20 |
C -- DELETE {var,var,...} Delete assigned variable |
| 21 |
C -- ALIAS {name,var,n} Assign alias to vector/tensor variables |
| 22 |
C -- |
| 23 |
C -- TMIN {TMIN} Set minimum selected time |
| 24 |
C -- TMAX {TMAX} Set maximum selected time |
| 25 |
C -- DELTIME {DELT} Set selected time interval |
| 26 |
C -- NINTV {NINTV} Change selected time interval |
| 27 |
C -- ZINTV {NINTV} Change selected time interval(zero interval) |
| 28 |
C -- ALLTIMES Select all times |
| 29 |
C -- TIMES {t1,t2...} Select specified times |
| 30 |
C -- STEPS {n1,n2...} Select specified steps |
| 31 |
C -- |
| 32 |
C -- ZOOM {x1,x2,y1,y2,z1,z2} Set zoomed mesh limits |
| 33 |
C -- VISIBLE {id1,...} Set element blocks to be written |
| 34 |
C -- BLOCKS {id1,...} Set selected element blocks |
| 35 |
C -- MATERIAL {id1,...} Set selected element blocks |
| 36 |
C -- |
| 37 |
C -- LIST {option} Display database information |
| 38 |
C -- SHOW {option} Display parameter setting |
| 39 |
C -- HELP {option} Help on ALGEBRA |
| 40 |
C -- |
| 41 |
C -- END Exit to evaluate equations (also EXIT) |
| 42 |
C -- QUIT Exit but do not write database |
| 43 |
C -- |
| 44 |
C --Parameters: |
| 45 |
C -- A - IN - the dynamic memory base array |
| 46 |
C -- INLINE - IN/OUT - the parsed input lines for the log file |
| 47 |
C -- INTYP - IN - the input types from the free field reader |
| 48 |
C -- CFIELD - IN - the character fields |
| 49 |
C -- IFIELD - IN - the integer fields |
| 50 |
C -- RFIELD - IN - the real fields |
| 51 |
C -- NAMECO - IN - the coordinate names |
| 52 |
C -- BLKTYP - IN - the element block names |
| 53 |
C -- NAMES - IN - the global, nodal, and element variable names |
| 54 |
C -- TIMES - IN - the database time steps |
| 55 |
C -- IPTIMS - IN/OUT - the selected times steps |
| 56 |
C -- IDELB - IN - the element block IDs |
| 57 |
C -- VISELB(i) - IN/OUT - true iff element block i is to be written |
| 58 |
C -- SELELB(i) - IN/OUT - true iff element block i is selected |
| 59 |
C -- QAREC - IN - the QA records containing: |
| 60 |
C -- (1) - the analysis code name |
| 61 |
C -- (2) - the analysis code QA descriptor |
| 62 |
C -- (3) - the analysis date |
| 63 |
C -- (4) - the analysis time |
| 64 |
C -- INFREC - IN - the information records |
| 65 |
C -- RETVRB - OUT - returned action verb (END, QUIT, PRINT, LOG) |
| 66 |
C -- |
| 67 |
C --Common Variables: |
| 68 |
C -- Uses NDIM, NSTEPS of /DBNUMS/ |
| 69 |
C -- Sets TITLEO of /DBTITL/ |
| 70 |
C -- Sets NPTIMS, TMIN, TMAX, DELT, NINTV, WHONLY of /TIMES/ |
| 71 |
C -- Sets ISZOOM, ZMLIM of /ZOOM/ |
| 72 |
C -- Uses FNCNAM of /FNCTBL/ |
| 73 |
|
| 74 |
include 'exodusII.inc' |
| 75 |
include 'ag_namlen.blk' |
| 76 |
include 'ag_dbnums.blk' |
| 77 |
include 'ag_dbtitl.blk' |
| 78 |
include 'ag_times.blk' |
| 79 |
include 'ag_zoom.blk' |
| 80 |
include 'ag_filter.blk' |
| 81 |
include 'ag_remove.blk' |
| 82 |
include 'ag_fnctbc.blk' |
| 83 |
|
| 84 |
common /debugc/ cdebug |
| 85 |
common /debugn/ idebug |
| 86 |
character*(mxstln) cdebug |
| 87 |
|
| 88 |
LOGICAL FFEXST, FFNUMB, MATSTR |
| 89 |
|
| 90 |
DIMENSION A(*) |
| 91 |
CHARACTER*(*) INLINE(*) |
| 92 |
INTEGER INTYP(*) |
| 93 |
CHARACTER*(*) CFIELD(*) |
| 94 |
INTEGER IFIELD(*) |
| 95 |
REAL RFIELD(*) |
| 96 |
CHARACTER*(namlen) NAMECO(*) |
| 97 |
CHARACTER*(MXSTLN) BLKTYP(*) |
| 98 |
CHARACTER*(namlen) NAMES(*) |
| 99 |
REAL TIMES(*) |
| 100 |
INTEGER IPTIMS(*) |
| 101 |
INTEGER IDELB(*) |
| 102 |
LOGICAL VISELB(NELBLK) |
| 103 |
LOGICAL SELELB(NELBLK) |
| 104 |
CHARACTER*(MXSTLN) QAREC(4,*) |
| 105 |
CHARACTER*(MXLNLN) INFREC(*) |
| 106 |
CHARACTER*(*) RETVRB |
| 107 |
CHARACTER*1 OPTION |
| 108 |
|
| 109 |
CHARACTER*(maxnam) VERB, WORD |
| 110 |
CHARACTER*(mxstln) HLPTYP |
| 111 |
LOGICAL ISON |
| 112 |
LOGICAL HELP |
| 113 |
LOGICAL XLIM, YLIM, ZLIM |
| 114 |
INTEGER MERR |
| 115 |
|
| 116 |
CHARACTER*(mxstln) CMDTBL(26) |
| 117 |
SAVE CMDTBL |
| 118 |
C --CMDTBL - the commands table |
| 119 |
|
| 120 |
CHARACTER*(mxstln) HLPTBL(4) |
| 121 |
SAVE HLPTBL |
| 122 |
C --HLPTBL - the HELP type table |
| 123 |
|
| 124 |
MERR = 0 |
| 125 |
|
| 126 |
C --Command table follows. Remember to change the dimensioned size when |
| 127 |
C --changing the table. |
| 128 |
DATA CMDTBL / |
| 129 |
1 'TITLE ', |
| 130 |
2 'SAVE ', |
| 131 |
3 'DELETE ', |
| 132 |
4 'ALIAS ', |
| 133 |
5 'TMIN ', |
| 134 |
6 'TMAX ', |
| 135 |
7 'DELTIME ', |
| 136 |
8 'NINTV ', |
| 137 |
9 'ZINTV ', |
| 138 |
* 'ALLTIMES ', |
| 139 |
1 'TIMES ', |
| 140 |
2 'STEPS ', |
| 141 |
3 'ZOOM ', |
| 142 |
4 'FILTER ', |
| 143 |
5 'VISIBLE ', |
| 144 |
6 'BLOCKS ', |
| 145 |
7 'MATERIAL ', |
| 146 |
8 'LOG ', |
| 147 |
9 'LIST ', |
| 148 |
* 'SHOW ', |
| 149 |
1 'HELP ', |
| 150 |
2 'END ', |
| 151 |
3 'EXIT ', |
| 152 |
4 'QUIT ', |
| 153 |
4 'REMOVE ', |
| 154 |
* ' ' / |
| 155 |
|
| 156 |
C --HELP type table follows. Remember to change the dimensioned size when |
| 157 |
C --changing the table. |
| 158 |
DATA HLPTBL / |
| 159 |
& 'RULES ', |
| 160 |
* 'COMMANDS ', |
| 161 |
* 'FUNCTION ', |
| 162 |
& ' ' / |
| 163 |
|
| 164 |
RETVRB = ' ' |
| 165 |
|
| 166 |
IFLD = 1 |
| 167 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 168 |
CALL ABRSTR (VERB, WORD, CMDTBL) |
| 169 |
IF (VERB .EQ. ' ') VERB = WORD |
| 170 |
|
| 171 |
IF (VERB .EQ. 'TITLE') THEN |
| 172 |
CALL FFADDC (VERB, INLINE(1)) |
| 173 |
CALL GETINP (0, 0, 'TITLE> ', TITLEO, IOSTAT) |
| 174 |
INLINE(2) = TITLEO |
| 175 |
|
| 176 |
ELSE IF (VERB .EQ. 'ALIAS') THEN |
| 177 |
CALL FFADDC (VERB, INLINE(1)) |
| 178 |
CALL ALICMD (INLINE, INTYP(IFLD), CFIELD(IFLD), IFIELD(IFLD), |
| 179 |
& NAMES, *150) |
| 180 |
|
| 181 |
ELSE IF (VERB .EQ. 'SAVE') THEN |
| 182 |
CALL FFADDC (VERB, INLINE(1)) |
| 183 |
CALL SAVCMD (INLINE, INTYP(IFLD), CFIELD(IFLD), NAMES, *150) |
| 184 |
|
| 185 |
ELSE IF (VERB .EQ. 'DELETE') THEN |
| 186 |
CALL FFADDC (VERB, INLINE(1)) |
| 187 |
CALL DELCMD (INLINE, INTYP(IFLD), CFIELD(IFLD), *150) |
| 188 |
|
| 189 |
ELSE IF ((VERB .EQ. 'TMIN') .OR. (VERB .EQ. 'TMAX') |
| 190 |
& .OR. (VERB .EQ. 'DELTIME') |
| 191 |
& .OR. (VERB .EQ. 'NINTV') .OR. (VERB .EQ. 'ZINTV') |
| 192 |
& .OR. (VERB .EQ. 'ALLTIMES') |
| 193 |
& .OR. (VERB .EQ. 'TIMES') .OR. (VERB .EQ. 'STEPS')) THEN |
| 194 |
CALL CMDTIM (INLINE, VERB, IFLD, INTYP, CFIELD, IFIELD, |
| 195 |
& RFIELD, NSTEPS, TIMES, TMIN, TMAX, DELT, |
| 196 |
& NINTV, NPTIMS, IPTIMS) |
| 197 |
ELSE IF (VERB .EQ. 'FILTER') THEN |
| 198 |
CALL FFADDC (VERB, INLINE(1)) |
| 199 |
C ... Get name of element variable to use for filtering |
| 200 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 201 |
if (.not. matstr(word, 'ELEMENTS', 1)) THEN |
| 202 |
CALL PRTERR ('CMDERR', |
| 203 |
& 'Expected "ELEMENTS". Syntax: FILTER ELEMENTS {elem_var}') |
| 204 |
VERB = ' ' |
| 205 |
GOTO 150 |
| 206 |
ENDIF |
| 207 |
CALL FFADDC (word, INLINE(1)) |
| 208 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 209 |
CALL DBVIX('E', 1, IEV) |
| 210 |
IDXFLT = LOCSTR (WORD, NVAREL, NAMES(IEV)) |
| 211 |
if (idxflt .eq. 0) then |
| 212 |
CALL PRTERR ('CMDERR', |
| 213 |
& 'Variable name specified does not exist on database.') |
| 214 |
VERB = ' ' |
| 215 |
GOTO 150 |
| 216 |
end if |
| 217 |
CALL FFADDC (NAMES(idxflt+iev-1), INLINE(1)) |
| 218 |
|
| 219 |
C ... Check for comparison -- uses fortran LT, LE, EQ, NE, GT, GE |
| 220 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 221 |
if (.not. matstr(word, 'LT', 2) .and. |
| 222 |
* .not. matstr(word, 'LE', 2) .and. |
| 223 |
* .not. matstr(word, 'EQ', 2) .and. |
| 224 |
* .not. matstr(word, 'NE', 2) .and. |
| 225 |
* .not. matstr(word, 'GT', 2) .and. |
| 226 |
* .not. matstr(word, 'GE', 2)) then |
| 227 |
CALL PRTERR ('CMDERR', |
| 228 |
& 'Expected "LT", "LE", "EQ", "NE", "GT", or "GE".') |
| 229 |
VERB = ' ' |
| 230 |
GOTO 150 |
| 231 |
end if |
| 232 |
CALL FFADDC (word, INLINE(1)) |
| 233 |
if (matstr(word, 'LT', 2)) cmpflt = 1 |
| 234 |
if (matstr(word, 'LE', 2)) cmpflt = 2 |
| 235 |
if (matstr(word, 'EQ', 2)) cmpflt = 3 |
| 236 |
if (matstr(word, 'NE', 2)) cmpflt = 4 |
| 237 |
if (matstr(word, 'GT', 2)) cmpflt = 5 |
| 238 |
if (matstr(word, 'GE', 2)) cmpflt = 6 |
| 239 |
|
| 240 |
CALL FFREAL (IFLD, INTYP, RFIELD, |
| 241 |
& 'filter value', 0.0, VALFLT, *150) |
| 242 |
CALL FFADDR (VALFLT, INLINE(1)) |
| 243 |
|
| 244 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 245 |
if (.not. matstr(word, 'TIME', 1)) THEN |
| 246 |
CALL PRTERR ('CMDERR', |
| 247 |
& 'Expected "TIME". Syntax:') |
| 248 |
CALL PRTERR ('CMDSPEC', |
| 249 |
* 'FILTER ELEMENTS {elem_var} {CMP} {value} TIME {time}') |
| 250 |
VERB = ' ' |
| 251 |
GOTO 150 |
| 252 |
ENDIF |
| 253 |
CALL FFADDC (word, INLINE(1)) |
| 254 |
|
| 255 |
CALL FFREAL (IFLD, INTYP, RFIELD, |
| 256 |
& 'database time', 0.0, TIMFLT, *150) |
| 257 |
C ... Check that specified time is in range of times on database. Assume TIMES() is sorted. |
| 258 |
if (timflt .lt. times(1)) then |
| 259 |
call prterr('WARNING', |
| 260 |
* 'Specified time is less than minimum database time.') |
| 261 |
call prterr('CMDSPEC', |
| 262 |
* 'Setting filter time to minimum database time.') |
| 263 |
timflt = times(1) |
| 264 |
else if (timflt .gt. times(nsteps)) then |
| 265 |
call prterr('WARNING', |
| 266 |
* 'Specified time is greater than maximum database time.') |
| 267 |
call prterr('CMDSPEC', |
| 268 |
* 'Setting filter time to maximum database time.') |
| 269 |
timflt = times(nsteps) |
| 270 |
end if |
| 271 |
CALL FFADDR (TIMFLT, INLINE(1)) |
| 272 |
ISFILTER = .TRUE. |
| 273 |
|
| 274 |
ELSE IF (VERB .EQ. 'REMOVE') THEN |
| 275 |
CALL FFADDC (VERB, INLINE(1)) |
| 276 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 277 |
if (.not. matstr(word, 'ELEMENTS', 1)) THEN |
| 278 |
CALL PRTERR ('CMDERR', |
| 279 |
& 'Expected "ELEMENTS". " |
| 280 |
$"Syntax: REMOVE ELEMENTS [local | global] {list of ids}') |
| 281 |
VERB = ' ' |
| 282 |
GOTO 150 |
| 283 |
ENDIF |
| 284 |
CALL FFADDC (word, INLINE(1)) |
| 285 |
C ... See if LOCAL or GLOBAL or nothing specified for id space... |
| 286 |
IF (INTYP(IFLD) .EQ. 0) THEN |
| 287 |
call ffchar(IFLD, INTYP, CFIELD, ' ', WORD) |
| 288 |
if (matstr(word, 'GLOBAL', 1)) then |
| 289 |
idsglobal = .true. |
| 290 |
else if (matstr(word, 'LOCAL', 1)) then |
| 291 |
idsglobal = .false. |
| 292 |
end if |
| 293 |
else |
| 294 |
C ... Default is local ids or last set value. |
| 295 |
if (irmcnt .eq. 0) then |
| 296 |
idsglobal = .false. |
| 297 |
end if |
| 298 |
END IF |
| 299 |
C ... Gather ids of elements to delete... |
| 300 |
99 continue |
| 301 |
IF (FFEXST (IFLD, INTYP)) THEN |
| 302 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 303 |
& 'element ID', 0, ID, *129) |
| 304 |
IRMCNT = IRMCNT + 1 |
| 305 |
if (IRMCNT .gt. 1024) then |
| 306 |
CALL PRTERR ('CMDERR', |
| 307 |
& 'Can only specify a maximum of 1024 elements to delete') |
| 308 |
goto 129 |
| 309 |
end if |
| 310 |
idsrem(irmcnt) = id |
| 311 |
goto 99 |
| 312 |
END IF |
| 313 |
129 continue |
| 314 |
ISREMOVE = .TRUE. |
| 315 |
|
| 316 |
ELSE IF (VERB .EQ. 'ZOOM') THEN |
| 317 |
CALL FFADDC (VERB, INLINE(1)) |
| 318 |
CALL FFNEED (IFLD, INTYP, 'R', MIN(3,NDIM)*2, |
| 319 |
& 'zoom mesh limits for all dimensions', *150) |
| 320 |
DO 100 I = 1, MIN(3,NDIM)*2 |
| 321 |
CALL FFREAL (IFLD, INTYP, RFIELD, |
| 322 |
& 'zoom mesh limit', 0.0, ZMLIM(I), *150) |
| 323 |
CALL FFADDR (ZMLIM(I), INLINE(1)) |
| 324 |
100 CONTINUE |
| 325 |
CALL FFCHAR (IFLD, INTYP, CFIELD, 'INSIDE', WORD) |
| 326 |
IF (MATSTR (WORD, 'INSIDE', 1)) THEN |
| 327 |
CALL FFADDC ('INSIDE', INLINE(1)) |
| 328 |
ZOOMIN = .TRUE. |
| 329 |
ELSE IF (MATSTR (WORD, 'OUTSIDE', 1)) THEN |
| 330 |
CALL FFADDC ('OUTSIDE', INLINE(1)) |
| 331 |
ZOOMIN = .FALSE. |
| 332 |
END IF |
| 333 |
C Set logical variables which determine if zoom mesh limits |
| 334 |
C are of the correct format (minlimit < maxlimit) |
| 335 |
XLIM = (ZMLIM(1) .LE. ZMLIM(2)) |
| 336 |
YLIM = (ZMLIM(3) .LE. ZMLIM(4)) |
| 337 |
IF (NDIM .EQ. 3) THEN |
| 338 |
ZLIM = (ZMLIM(5) .LE. ZMLIM(6)) |
| 339 |
ELSE |
| 340 |
ZLIM = .TRUE. |
| 341 |
ENDIF |
| 342 |
IF ((.NOT. XLIM) .OR. (.NOT. YLIM) .OR. |
| 343 |
& (.NOT. ZLIM)) THEN |
| 344 |
C Zoom limits are incorrect |
| 345 |
CALL PRTERR ('CMDERR', |
| 346 |
& 'Zoom limits are incorrect. (minlimit > maxlimit)') |
| 347 |
INLINE(1) = ' ' |
| 348 |
ELSE |
| 349 |
ISZOOM = .TRUE. |
| 350 |
END IF |
| 351 |
ELSE IF (VERB .EQ. 'VISIBLE') THEN |
| 352 |
CALL FFADDC (VERB, INLINE(1)) |
| 353 |
|
| 354 |
IF (.NOT. FFEXST (IFLD, INTYP)) THEN |
| 355 |
|
| 356 |
C --Select all element blocks if no parameters |
| 357 |
|
| 358 |
CALL INILOG (NELBLK, .TRUE., VISELB) |
| 359 |
OPTION = '+' |
| 360 |
|
| 361 |
ELSE IF (.NOT. FFNUMB (IFLD, INTYP)) THEN |
| 362 |
|
| 363 |
C --Strip off ADD or DELETE option |
| 364 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 365 |
IF (MATSTR (WORD, 'ADD', 1)) THEN |
| 366 |
CALL FFADDC ('ADD', INLINE(1)) |
| 367 |
OPTION = '+' |
| 368 |
ELSE IF (MATSTR (WORD, 'DELETE', 1)) THEN |
| 369 |
CALL FFADDC ('DELETE', INLINE(1)) |
| 370 |
OPTION = '-' |
| 371 |
ELSE |
| 372 |
CALL PRTERR ('CMDERR', |
| 373 |
& 'Expected "ADD" or "DELETE" or element block ID') |
| 374 |
GOTO 160 |
| 375 |
END IF |
| 376 |
|
| 377 |
ELSE |
| 378 |
|
| 379 |
C --De-select all element blocks so only listed blocks are selected |
| 380 |
CALL INILOG (NELBLK, .FALSE., VISELB) |
| 381 |
OPTION = '+' |
| 382 |
END IF |
| 383 |
|
| 384 |
110 CONTINUE |
| 385 |
IF (FFEXST (IFLD, INTYP)) THEN |
| 386 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 387 |
& 'element block ID', 0, ID, *120) |
| 388 |
IELB = LOCINT (ID, NELBLK, IDELB) |
| 389 |
IF (IELB .GT. 0) THEN |
| 390 |
CALL FFADDI (ID, INLINE(1)) |
| 391 |
VISELB(IELB) = (OPTION .EQ. '+') |
| 392 |
ELSE |
| 393 |
CALL INTSTR (1, 0, ID, WORD, LSTR) |
| 394 |
CALL PRTERR ('CMDERR', 'Element block ID ' // |
| 395 |
& WORD(:LSTR) // ' does not exist, ignored') |
| 396 |
END IF |
| 397 |
120 CONTINUE |
| 398 |
GOTO 110 |
| 399 |
END IF |
| 400 |
|
| 401 |
ELSE IF ((VERB .EQ. 'BLOCKS') .OR. (VERB .EQ. 'MATERIAL')) THEN |
| 402 |
CALL FFADDC (VERB, INLINE(1)) |
| 403 |
IF (VERB .EQ. 'MATERIAL') VERB = 'BLOCKS' |
| 404 |
|
| 405 |
IF (.NOT. FFEXST (IFLD, INTYP)) THEN |
| 406 |
|
| 407 |
C --Select all element blocks if no parameters |
| 408 |
CALL INILOG (NELBLK, .TRUE., SELELB) |
| 409 |
OPTION = '+' |
| 410 |
|
| 411 |
ELSE IF (.NOT. FFNUMB (IFLD, INTYP)) THEN |
| 412 |
|
| 413 |
C --Strip off ADD or DELETE option |
| 414 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 415 |
IF (MATSTR (WORD, 'ADD', 1)) THEN |
| 416 |
CALL FFADDC ('ADD', INLINE(1)) |
| 417 |
OPTION = '+' |
| 418 |
ELSE IF (MATSTR (WORD, 'DELETE', 1)) THEN |
| 419 |
CALL FFADDC ('DELETE', INLINE(1)) |
| 420 |
OPTION = '-' |
| 421 |
ELSE |
| 422 |
CALL PRTERR ('CMDERR', |
| 423 |
& 'Expected "ADD" or "DELETE" or element block ID') |
| 424 |
GOTO 160 |
| 425 |
END IF |
| 426 |
|
| 427 |
ELSE |
| 428 |
|
| 429 |
C --De-select all element blocks so only listed blocks are selected |
| 430 |
CALL INILOG (NELBLK, .FALSE., SELELB) |
| 431 |
OPTION = '+' |
| 432 |
END IF |
| 433 |
|
| 434 |
130 CONTINUE |
| 435 |
IF (FFEXST (IFLD, INTYP)) THEN |
| 436 |
CALL FFINTG (IFLD, INTYP, IFIELD, |
| 437 |
& 'element block ID', 0, ID, *140) |
| 438 |
IELB = LOCINT (ID, NELBLK, IDELB) |
| 439 |
IF (IELB .GT. 0) THEN |
| 440 |
CALL FFADDI (ID, INLINE(1)) |
| 441 |
SELELB(IELB) = (OPTION .EQ. '+') |
| 442 |
ELSE |
| 443 |
CALL INTSTR (1, 0, ID, WORD, LSTR) |
| 444 |
CALL PRTERR ('CMDERR', 'Element block ID ' // |
| 445 |
& WORD(:LSTR) // ' does not exist, ignored') |
| 446 |
END IF |
| 447 |
140 CONTINUE |
| 448 |
GOTO 130 |
| 449 |
END IF |
| 450 |
|
| 451 |
RETVRB = 'BLOCKS' |
| 452 |
|
| 453 |
ELSE IF ((VERB .EQ. 'LOG') .or. (verb .eq. 'SAVELOG')) THEN |
| 454 |
if (verb .eq. 'SAVELOG') then |
| 455 |
call prterr ('CMDSPEC', 'Please use the LOG command') |
| 456 |
verb = 'LOG' |
| 457 |
end if |
| 458 |
VERB = ' ' |
| 459 |
RETVRB = 'LOG' |
| 460 |
|
| 461 |
ELSE IF (VERB .EQ. 'LIST') THEN |
| 462 |
VERB = ' ' |
| 463 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 464 |
CALL DBLIST (WORD, A, NAMECO, BLKTYP, NAMES, |
| 465 |
& TIMES, IDELB, QAREC, INFREC, MERR) |
| 466 |
IF (MERR .EQ. 1) RETURN |
| 467 |
|
| 468 |
ELSE IF (VERB .EQ. 'SHOW') THEN |
| 469 |
VERB = ' ' |
| 470 |
CALL FFCHAR (IFLD, INTYP, CFIELD, ' ', WORD) |
| 471 |
CALL SHOW (WORD, CMDTBL, NAMECO, BLKTYP, NAMES, |
| 472 |
& TIMES, IPTIMS, IDELB, VISELB, SELELB) |
| 473 |
|
| 474 |
IF (WORD .EQ. ' ') RETVRB = 'PRINT' |
| 475 |
|
| 476 |
ELSE IF (VERB .EQ. 'HELP') THEN |
| 477 |
VERB = ' ' |
| 478 |
CALL ABRSTR (HLPTYP, WORD, HLPTBL) |
| 479 |
ISON = HELP ('ALGEBRA', HLPTYP, ' ') |
| 480 |
IF (.NOT. ISON) THEN |
| 481 |
IF (HLPTYP .EQ. 'RULES') THEN |
| 482 |
CONTINUE |
| 483 |
ELSE IF (HLPTYP .EQ. 'COMMANDS') THEN |
| 484 |
CALL SHOCMD ('COMMANDS', CMDTBL) |
| 485 |
ELSE IF (HLPTYP .EQ. 'FUNCTION') THEN |
| 486 |
CALL SHOCMD ('Available Functions:', FNCNAM) |
| 487 |
ELSE |
| 488 |
CALL SHOCMD ('HELP Options:', HLPTBL) |
| 489 |
END IF |
| 490 |
END IF |
| 491 |
|
| 492 |
RETVRB = 'PRINT' |
| 493 |
|
| 494 |
ELSE IF ((VERB .EQ. 'END') .OR. (VERB .EQ. 'EXIT')) THEN |
| 495 |
VERB = ' ' |
| 496 |
CALL FFADDC ('END', INLINE(1)) |
| 497 |
RETVRB = 'END' |
| 498 |
|
| 499 |
ELSE IF (VERB .EQ. 'QUIT') THEN |
| 500 |
VERB = ' ' |
| 501 |
CALL FFADDC ('QUIT', INLINE(1)) |
| 502 |
RETVRB = 'QUIT' |
| 503 |
|
| 504 |
C --This command allows selectable debugging |
| 505 |
else if (verb .eq. 'DEBUG') then |
| 506 |
verb = ' ' |
| 507 |
call ffchar (ifld, intyp, cfield, ' ', cdebug) |
| 508 |
if (matstr (cdebug, 'EQUATION', 3)) then |
| 509 |
call prtdeb ('EQUATION', 0) |
| 510 |
else if (matstr (cdebug, 'VARIABLE', 3)) then |
| 511 |
call prtdeb ('VARIABLE', 0) |
| 512 |
else if (matstr (cdebug, 'ALL', 3)) then |
| 513 |
call prtdeb ('VARIABLE', 0) |
| 514 |
call prtdeb ('EQUATION', -1) |
| 515 |
end if |
| 516 |
|
| 517 |
ELSE |
| 518 |
CALL PRTERR ('CMDERR', '"' // VERB(:LENSTR(VERB)) |
| 519 |
& // '" is an invalid command') |
| 520 |
VERB = ' ' |
| 521 |
GOTO 150 |
| 522 |
END IF |
| 523 |
|
| 524 |
GOTO 160 |
| 525 |
|
| 526 |
150 CONTINUE |
| 527 |
INLINE(1) = ' ' |
| 528 |
|
| 529 |
160 CONTINUE |
| 530 |
IF (VERB .NE. ' ') THEN |
| 531 |
CALL SHOW (VERB, CMDTBL, NAMECO, BLKTYP, NAMES, |
| 532 |
& TIMES, IPTIMS, IDELB, VISELB, SELELB) |
| 533 |
END IF |
| 534 |
|
| 535 |
RETURN |
| 536 |
END |