Debian Codegraph @

packages/seacas/applications/algebra/ag_nxttim.f

raw
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 NXTTIM ()
9 C=======================================================================
10
11 C --*** NXTTIM *** (ALGEBRA) Move current time variables to last time
12 C -- Written by Amy Gilkey - revised 12/10/87
13 C --
14 C --NXTTIM moves the values of the variables for the current time to the
15 C --location for the last time. The move is implemented by swapping
16 C --the location pointers for the last and current time.
17 C --
18 C --Parameters:
19 C --
20 C --Common Variables:
21 C -- Sets ISTVAR of /VAR../
22 C -- Uses NUMINP, IXLHS of /VAR../
23
24 PARAMETER (ICURTM = 1, ILSTTM = 2, IONETM = 3)
25
26 include 'ag_namlen.blk'
27 include 'ag_var.blk'
28
29 c LOGICAL WHOTIM
30
31 c LOGICAL ISHIST
32
33 C --If previous time requested, swap pointers for current and previous time
34
35 DO 100 IVAR = 1, NUMINP
36 c ISHIST = ((TYPVAR(IVAR) .EQ. 'H') .OR. (TYPVAR(IVAR) .EQ. 'T'))
37 c IF (ISHIST .OR. WHOTIM) THEN
38 IF (ISTVAR(ILSTTM,IVAR) .GT. 0) THEN
39 I = ISTVAR(ICURTM,IVAR)
40 ISTVAR(ICURTM,IVAR) = ISTVAR(ILSTTM,IVAR)
41 ISTVAR(ILSTTM,IVAR) = I
42 END IF
43 c END IF
44 100 CONTINUE
45
46 DO 110 IVAR = IXLHS, MAXVAR
47 c ISHIST = ((TYPVAR(IVAR) .EQ. 'H') .OR. (TYPVAR(IVAR) .EQ. 'T'))
48 c IF (ISHIST .OR. WHOTIM) THEN
49 IF (ISTVAR(ILSTTM,IVAR) .GT. 0) THEN
50 I = ISTVAR(ICURTM,IVAR)
51 ISTVAR(ICURTM,IVAR) = ISTVAR(ILSTTM,IVAR)
52 ISTVAR(ILSTTM,IVAR) = I
53 END IF
54 c END IF
55 110 CONTINUE
56
57 RETURN
58 END