| 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 FIXONE (MAXNE, VARVAL) |
| 8 |
C======================================================================= |
| 9 |
|
| 10 |
C --*** FIXONE *** (ALGEBRA) Handle first time step variables |
| 11 |
C -- Written by Amy Gilkey - revised 12/10/87 |
| 12 |
C -- |
| 13 |
C --FIXONE is called after the first time step is read in. It copies |
| 14 |
C --the current variables to the last and first time step variables |
| 15 |
C --(if needed). It also corrects the current variable pointer if |
| 16 |
C --only the first time step for a variable is needed. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- MAXNE - IN - the VARVAL dimension |
| 20 |
C -- VARVAL - IN/OUT - the input data and copied data |
| 21 |
C -- |
| 22 |
C --Common Variables: |
| 23 |
C -- Uses ISTVAR of /VAR../ |
| 24 |
C -- Uses NVARNP, NVAREL of /DBNUMS/ |
| 25 |
|
| 26 |
PARAMETER (ICURTM = 1, ILSTTM = 2, IONETM = 3) |
| 27 |
|
| 28 |
include 'ag_namlen.blk' |
| 29 |
include 'ag_var.blk' |
| 30 |
|
| 31 |
REAL VARVAL(MAXNE,*) |
| 32 |
|
| 33 |
DO 100 IVAR = 1, NUMINP |
| 34 |
IF (ISTVAR(IONETM,IVAR) .GT. 0) THEN |
| 35 |
IF (ISTVAR(ICURTM,IVAR) .LT. 0) THEN |
| 36 |
ISTVAR(ICURTM,IVAR) = 0 |
| 37 |
ELSE |
| 38 |
IFROM = ISTVAR(ICURTM,IVAR) |
| 39 |
ITO = ISTVAR(IONETM,IVAR) |
| 40 |
CALL CPYVAR (TYPVAR(IVAR), MAXNE, |
| 41 |
& VARVAL(1,IFROM), VARVAL(1,ITO)) |
| 42 |
END IF |
| 43 |
END IF |
| 44 |
IF (ISTVAR(ILSTTM,IVAR) .GT. 0) THEN |
| 45 |
IFROM = ISTVAR(ICURTM,IVAR) |
| 46 |
ITO = ISTVAR(ILSTTM,IVAR) |
| 47 |
CALL CPYVAR (TYPVAR(IVAR), MAXNE, |
| 48 |
& VARVAL(1,IFROM), VARVAL(1,ITO)) |
| 49 |
END IF |
| 50 |
100 CONTINUE |
| 51 |
|
| 52 |
DO 120 IVAR = IXLHS, MAXVAR |
| 53 |
DO 110 ITM = 1, 3 |
| 54 |
IF (ITM .NE. ICURTM) THEN |
| 55 |
IF (ISTVAR(ITM,IVAR) .GT. 0) THEN |
| 56 |
IFROM = ISTVAR(ICURTM,IVAR) |
| 57 |
ITO = ISTVAR(ITM,IVAR) |
| 58 |
CALL CPYVAR (TYPVAR(IVAR), MAXNE, |
| 59 |
& VARVAL(1,IFROM), VARVAL(1,ITO)) |
| 60 |
END IF |
| 61 |
END IF |
| 62 |
110 CONTINUE |
| 63 |
120 CONTINUE |
| 64 |
|
| 65 |
RETURN |
| 66 |
END |