| 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 MAKEVO (NELBLK, ISEVOK, IEV1, IEV2, IEVOUT, IEVSEL) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** MAKEVO *** (ALGEBRA) Make up ISEVOK entry |
| 12 |
C -- Written by Amy Gilkey - revised 05/12/88 |
| 13 |
C -- |
| 14 |
C --MAKEVO makes up an ISEVOK entry based on two input entries. The output |
| 15 |
C --entry is true iff the two input entries are true. A flag indicates |
| 16 |
C --if the output entry is equal to one of the input entries, but the |
| 17 |
C --output entry is still set. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- NELBLK - IN - the number of element blocks |
| 21 |
C -- ISEVOK - IN/OUT - the variable truth table |
| 22 |
C -- IEV1, IEV2 - IN - the ISEVOK indices of the two input entries; |
| 23 |
C -- either index may be 0, but not both |
| 24 |
C -- IEVOUT - OUT - the ISEVOK index of the output entry |
| 25 |
C -- IEVSEL - OUT - the ISEVOK index of the input entry that is equal |
| 26 |
C -- to the output entry or the index of the output entry if |
| 27 |
C -- neither entry is equal |
| 28 |
|
| 29 |
LOGICAL ISEVOK(NELBLK,*) |
| 30 |
|
| 31 |
LOGICAL OK1, OK2 |
| 32 |
|
| 33 |
OK1 = (IEV1 .GE. 1) |
| 34 |
OK2 = (IEV2 .GE. 1) |
| 35 |
|
| 36 |
IF ((IEV1 .GE. 1) .AND. (IEV2 .GE. 1)) THEN |
| 37 |
DO 100 IELB = 1, NELBLK |
| 38 |
IF (ISEVOK(IELB,IEV1) .EQV. ISEVOK(IELB,IEV2)) THEN |
| 39 |
ISEVOK(IELB,IEVOUT) = ISEVOK(IELB,IEV1) |
| 40 |
ELSE |
| 41 |
IF (ISEVOK(IELB,IEV1)) THEN |
| 42 |
OK1 = .FALSE. |
| 43 |
ELSE |
| 44 |
OK2 = .FALSE. |
| 45 |
END IF |
| 46 |
ISEVOK(IELB,IEVOUT) = .FALSE. |
| 47 |
END IF |
| 48 |
100 CONTINUE |
| 49 |
ELSE IF (IEV1 .GE. 1) THEN |
| 50 |
DO 110 IELB = 1, NELBLK |
| 51 |
ISEVOK(IELB,IEVOUT) = ISEVOK(IELB,IEV1) |
| 52 |
110 CONTINUE |
| 53 |
ELSE IF (IEV2 .GE. 1) THEN |
| 54 |
DO 120 IELB = 1, NELBLK |
| 55 |
ISEVOK(IELB,IEVOUT) = ISEVOK(IELB,IEV2) |
| 56 |
120 CONTINUE |
| 57 |
ELSE |
| 58 |
DO 130 IELB = 1, NELBLK |
| 59 |
ISEVOK(IELB,IEVOUT) = .TRUE. |
| 60 |
130 CONTINUE |
| 61 |
END IF |
| 62 |
|
| 63 |
IF (OK1) THEN |
| 64 |
IEVSEL = IEV1 |
| 65 |
ELSE IF (OK2) THEN |
| 66 |
IEVSEL = IEV2 |
| 67 |
ELSE |
| 68 |
IEVSEL = IEVOUT |
| 69 |
END IF |
| 70 |
|
| 71 |
RETURN |
| 72 |
END |