| 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 DBVINI (NVARGL, NVARNP, NVAREL) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** DBVINI *** (EXOLIB) Initialize for DBVTYP and DBVIX |
| 12 |
C -- Written by Amy Gilkey - revised 10/14/87 |
| 13 |
C -- |
| 14 |
C --DBVINI initializes the indices for DBVTYP and DBVID. It must be |
| 15 |
C --called before either of the other two routines are called. |
| 16 |
C -- |
| 17 |
C --Note that the indices are shared because the other two routines |
| 18 |
C --are ENTRY routines of DBVINI. |
| 19 |
C -- |
| 20 |
C --Parameters: |
| 21 |
C -- NVARGL - IN - the number of global variables |
| 22 |
C -- NVARNP - IN - the number of nodal variables |
| 23 |
C -- NVAREL - IN - the number of element variables |
| 24 |
|
| 25 |
INTEGER IXGV, IXNV, IXEV, IXGVE, IXNVE, IXEVE |
| 26 |
common /dbv/ IXGV, IXNV, IXEV, IXGVE, IXNVE, IXEVE |
| 27 |
|
| 28 |
INTEGER NVARGL, NVARNP, NVAREL |
| 29 |
|
| 30 |
IXGV = 1 |
| 31 |
IXGVE = IXGV + NVARGL - 1 |
| 32 |
IXNV = IXGVE + 1 |
| 33 |
IXNVE = IXNV + NVARNP - 1 |
| 34 |
IXEV = IXNVE + 1 |
| 35 |
IXEVE = IXEV + NVAREL - 1 |
| 36 |
|
| 37 |
RETURN |
| 38 |
END |
| 39 |
|
| 40 |
C======================================================================= |
| 41 |
SUBROUTINE DBVIX (ITYP, IID, IX) |
| 42 |
C======================================================================= |
| 43 |
|
| 44 |
C --*** DBVIX *** (EXOLIB) Return the variable index |
| 45 |
C -- Written by Amy Gilkey - revised 10/14/87 |
| 46 |
C -- |
| 47 |
C --DBVIX is passed a variable type and number. It returns the variable |
| 48 |
C --index. |
| 49 |
C -- |
| 50 |
C --Note that DBVINI must be called before this routine to initialize |
| 51 |
C --the indices. The indices are shared because this routine is an |
| 52 |
C --ENTRY routine of DBVINI. |
| 53 |
C -- |
| 54 |
C --Parameters: |
| 55 |
C -- ITYP - IN - the variable type: 'G'lobal, 'N'odal, 'E'lement |
| 56 |
C -- IID - IN - the variable number within the type |
| 57 |
C -- IX - OUT - the variable index |
| 58 |
|
| 59 |
INTEGER IXGV, IXNV, IXEV, IXGVE, IXNVE, IXEVE |
| 60 |
common /dbv/ IXGV, IXNV, IXEV, IXGVE, IXNVE, IXEVE |
| 61 |
|
| 62 |
CHARACTER ITYP |
| 63 |
INTEGER IID, IX |
| 64 |
|
| 65 |
IF ((IXGV .LE. 0) .AND. (IXNV .LE. 0) |
| 66 |
& .AND. (IXEV .LE. 0)) RETURN |
| 67 |
|
| 68 |
IF (ITYP .EQ. 'G') THEN |
| 69 |
IX = IID + IXGV - 1 |
| 70 |
ELSE IF (ITYP .EQ. 'N') THEN |
| 71 |
IX = IID + IXNV - 1 |
| 72 |
ELSE IF (ITYP .EQ. 'E') THEN |
| 73 |
IX = IID + IXEV - 1 |
| 74 |
END IF |
| 75 |
|
| 76 |
RETURN |
| 77 |
END |