Debian Codegraph @

packages/seacas/applications/blot/spstor.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 SPSTOR (A, ISTEP, TYP, NWRDS, NVAR, NENUM,
9 & PLTVAL, DATA)
10 C=======================================================================
11
12 C --*** SPSTOR *** (SPLOT) Read and store plot variables from database
13 C -- Written by Amy Gilkey - revised 11/05/87
14 C --
15 C --SPSTOR reads variables from the database and stores any that are
16 C --plot variables in the appropriate location. It reads only one
17 C --variable type (nodal or element) per call.
18 C --
19 C --Parameters:
20 C -- A - IN - the dynamic memory base array
21 C -- ISTEP - IN - the time step number
22 C -- TYP - IN - the variable type ("N"odal or "E"lement)
23 C -- NWRDS - IN - the number of words in a data record
24 C -- NVAR - IN - the number of records to read
25 C -- NENUM - IN - the selected node/element numbers
26 C -- PLTVAL - OUT - the plot data array
27 C -- DATA - SCRATCH - size = NWRDS
28 C --
29 C --Common Variables:
30 C -- Uses NELBLK, NVAREL of /DBNUMS/
31 C -- Uses NNENUM of /SELNE/
32 C -- Uses NSPVAR, ISVID of /SPVARS/
33
34 include 'params.blk'
35 include 'dbnums.blk'
36 include 'selne.blk'
37 include 'spvars.blk'
38
39 DIMENSION A(*)
40 CHARACTER TYP
41 INTEGER NENUM(NNENUM)
42 REAL PLTVAL(NNENUM,NSPVAR)
43 REAL DATA(NWRDS)
44
45 LOGICAL NEED
46
47 CALL DBVIX_BL (TYP, 1, ISID)
48 CALL DBVIX_BL (TYP, NVAR, IEID)
49
50 DO 120 ID = ISID, IEID
51
52 C --Determine if variable is needed
53
54 NEED = (LOCINT (ID, NSPVAR, ISVID) .GT. 0)
55
56 IF (NEED) THEN
57
58 C --Read nodal/element variable
59
60 CALL GETVAR (A, ID, -1, ISTEP, NWRDS, DATA)
61
62 C --Scan plot variable information and store if a node/element
63 C --point from this data is to be plotted
64
65 DO 110 N = 1, NSPVAR
66 IF (ID .EQ. ISVID(N)) THEN
67 DO 100 I = 1, NNENUM
68 NE = NENUM(I)
69 PLTVAL(I,N) = DATA(NE)
70 100 CONTINUE
71 END IF
72 110 CONTINUE
73 END IF
74 120 CONTINUE
75
76 RETURN
77 END