| 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 SCACAL (NAME, IVAR, USESEL, IELBST, |
| 9 |
& ISTMN, ICALC) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** SCACAL *** (BLOT) Return variable scaling if already calculated |
| 13 |
C -- Written by Amy Gilkey - revised 11/03/87 |
| 14 |
C -- |
| 15 |
C --SCACAL determines if the variables has already been scaled. If not, |
| 16 |
C --a scaling message is printed. For element variables, the message |
| 17 |
C --is printed if all element blocks are not selected. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- NAME - IN - the variable name |
| 21 |
C -- IVAR - IN - the variable index |
| 22 |
C -- USESEL - IN - use the element blocks selected array iff true, |
| 23 |
C -- else all selected |
| 24 |
C -- IELBST - IN - the element block status (>0 if selected) |
| 25 |
C -- ISTMN - IN - the "state" of the minimums and maximums: |
| 26 |
C -- <0 if not calculated |
| 27 |
C -- 0 if no elements in element block |
| 28 |
C -- +n if calculated |
| 29 |
C -- ICALC - OUT - the scaling flag |
| 30 |
C -- 0 = all element blocks selected (if element) and min/max calculated |
| 31 |
C -- 1 = not all element blocks selected (if element), but min/max |
| 32 |
C -- calculated for each selected element block |
| 33 |
C -- 2 = min/max not calculated for some element block |
| 34 |
C -- |
| 35 |
C --Common Variables: |
| 36 |
C -- Uses NELBLK, NVARNP, NVAREL of /DBNUMS/ |
| 37 |
|
| 38 |
include 'dbnums.blk' |
| 39 |
|
| 40 |
CHARACTER*(*) NAME |
| 41 |
LOGICAL USESEL |
| 42 |
INTEGER IELBST(*) |
| 43 |
INTEGER ISTMN(0:*) |
| 44 |
|
| 45 |
CHARACTER TYP |
| 46 |
|
| 47 |
C --Get variable type |
| 48 |
|
| 49 |
CALL DBVTYP_BL (IVAR, TYP, IDUM) |
| 50 |
|
| 51 |
IF ((TYP .EQ. 'H') .OR. (TYP .EQ. 'G') |
| 52 |
& .OR. (TYP .EQ. 'N')) THEN |
| 53 |
|
| 54 |
C --History, global or nodal variable, check min/max already computed |
| 55 |
|
| 56 |
IF (ISTMN(0) .GE. 0) THEN |
| 57 |
ICALC = 0 |
| 58 |
ELSE |
| 59 |
ICALC = 2 |
| 60 |
END IF |
| 61 |
|
| 62 |
ELSE IF (TYP .EQ. 'E') THEN |
| 63 |
|
| 64 |
C --Element variable, check if all element blocks selected and if |
| 65 |
C --all-blocks min/max already computed |
| 66 |
|
| 67 |
IF (USESEL) THEN |
| 68 |
CALL CNTELB (IELBST, NELBLK, NUMON, NUMSEL) |
| 69 |
ELSE |
| 70 |
NUMSEL = NELBLK |
| 71 |
END IF |
| 72 |
|
| 73 |
IF ((NUMSEL .GE. NELBLK) .AND. (ISTMN(0) .GE. 0)) THEN |
| 74 |
ICALC = 0 |
| 75 |
|
| 76 |
ELSE |
| 77 |
|
| 78 |
C --If not all element blocks selected, determine if each min/max for |
| 79 |
C --variable already computed |
| 80 |
|
| 81 |
ICALC = 1 |
| 82 |
DO 100 IELB = 1, NELBLK |
| 83 |
IF (ISTMN(IELB) .LT. 0) ICALC = 2 |
| 84 |
100 CONTINUE |
| 85 |
END IF |
| 86 |
|
| 87 |
END IF |
| 88 |
|
| 89 |
IF (ICALC .GT. 0) THEN |
| 90 |
WRITE (*, 10000) 'Scaling variable ', NAME(:LENSTR(NAME)) |
| 91 |
END IF |
| 92 |
|
| 93 |
RETURN |
| 94 |
10000 FORMAT (1X, 5A) |
| 95 |
END |