Debian Codegraph @

packages/seacas/applications/blot/gtmvar.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 GTMVAR (A, IVAR, IELBLK, INSTEP, LENVAR, VAR)
9 C=======================================================================
10
11 C --*** GTMVAR *** (BLOT) Read variable
12 C -- Written by Amy Gilkey - revised 05/17/88
13 C --
14 C --GTMVAR returns the values for the requested variable for the
15 C --requested time step. It either reads the values from the sequential
16 C --database file and writes them to a direct access scratch file or it
17 C --reads the values from the direct access scratch file.
18 C --
19 C --This routine uses MDFIND to find the following dynamic memory arrays:
20 C -- NUMELB - the number of elements per element block
21 C -- ISEVOK - the element block variable truth table;
22 C -- variable i of block j exists iff ISEVOK(j,i)
23 C -- WHOTIM - true iff whole (versus history) time step
24 C --
25 C --Parameters:
26 C -- A - IN - the dynamic memory base array
27 C -- IVAR - IN - the variable index
28 C -- (0 to initialize random file only)
29 C -- IELBLK - IN - the element block number, <=0 for all
30 C -- (for element blocks only)
31 C -- INSTEP - IN - the time step number
32 C -- = +n to read time step n
33 C -- = -n to transfer time step n to random file only
34 C -- = 0 to transfer all time steps to random file
35 C -- LENVAR - IN - the length of VAR
36 C -- VAR - OUT - the variable values (indeterminate if INSTEP <= 0)
37 C --
38 C --Common Variables:
39 C -- Uses NDB of /DBASE/
40 C -- Uses NUMNP, NUMEL, NELBLK, NVARHI, NVARGL, NVARNP, NVAREL,
41 C -- NSTEPS, NSTEPW of /DBNUMS/
42 C --
43 C --Database is rewound upon the first entry of this routine; upon
44 C --exit a flag is set to keep track of the database position; the
45 C --database should not be moved between calls to this routine.
46 C --
47 C --A scratch random file is created and read and written in this routine.
48 C --It is connected to unit 90.
49
50 DIMENSION A(*)
51 REAL VAR(*)
52
53 IF (IVAR .LE. 0) RETURN
54 CALL RNDVAR (A, A, A, IVAR, IELBLK, INSTEP, LENVAR, VAR)
55
56 RETURN
57 END