| 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 LNSTOR (A, ISTEP, TYP, NWRDS, NVAR, NPT, NPTS, |
| 9 |
& XLN, YLN, ZLN, DATA) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** LNSTOR *** (PATHLN) Read and store pathline data from database |
| 13 |
C -- Written by Amy Gilkey - revised 05/27/88 |
| 14 |
C -- |
| 15 |
C --LNSTOR reads variables from the database and stores any that are |
| 16 |
C --pathline data in the appropriate location. It reads only one |
| 17 |
C --variable type (history, global, nodal, 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 type of variable: |
| 23 |
C -- 'H'istory, 'G'lobal, 'N'odal, 'E'lement |
| 24 |
C -- NWRDS - IN - the number of words in a data record |
| 25 |
C -- NVAR - IN - the number of records to read |
| 26 |
C -- NPT - IN - the XLN, YLN, ZLN time index to fill |
| 27 |
C -- NPTS - IN - the maximum XLN, YLN, ZLN time index |
| 28 |
C -- XLN, YLN, ZLN - IN/OUT - the pathline data array |
| 29 |
C -- DATA - SCRATCH - size = NWRDS |
| 30 |
C -- |
| 31 |
C --Common Variables: |
| 32 |
C -- Uses NLNCRV, ILVNE, ILVID of /LNVARS/ |
| 33 |
|
| 34 |
include 'lnvars.blk' |
| 35 |
include 'dbnums.blk' |
| 36 |
|
| 37 |
DIMENSION A(*) |
| 38 |
CHARACTER TYP |
| 39 |
REAL XLN(NPTS,NLNCRV), YLN(NPTS,NLNCRV), ZLN(NPTS,NLNCRV) |
| 40 |
REAL DATA(NWRDS) |
| 41 |
|
| 42 |
LOGICAL NEED |
| 43 |
CHARACTER T |
| 44 |
|
| 45 |
CALL DBVIX_BL (TYP, 1, ISID) |
| 46 |
CALL DBVIX_BL (TYP, NVAR, IEID) |
| 47 |
|
| 48 |
IF ((TYP .EQ. 'H') .OR. (TYP .EQ. 'G')) THEN |
| 49 |
|
| 50 |
C --Read history or global variables |
| 51 |
|
| 52 |
CALL GETVAR (A, ISID, -999, ISTEP, NWRDS, DATA) |
| 53 |
|
| 54 |
C --Scan plot variable information and store if a history or global |
| 55 |
C --point from this data is to be plotted |
| 56 |
|
| 57 |
DO 100 NP = 1, NLNCRV |
| 58 |
CALL DBVTYP_BL (ILVID(1,NP), T, IDUM) |
| 59 |
IF ((T .EQ. 'H') .OR. (T .EQ. 'G')) THEN |
| 60 |
CALL DBVTYP_BL (ILVID(1,NP), T, NE) |
| 61 |
XLN(NPT,NP) = DATA(NE) |
| 62 |
CALL DBVTYP_BL (ILVID(2,NP), T, NE) |
| 63 |
YLN(NPT,NP) = DATA(NE) |
| 64 |
IF (NDIM .GE. 3) THEN |
| 65 |
CALL DBVTYP_BL (ILVID(3,NP), T, NE) |
| 66 |
ZLN(NPT,NP) = DATA(NE) |
| 67 |
END IF |
| 68 |
END IF |
| 69 |
100 CONTINUE |
| 70 |
|
| 71 |
ELSE |
| 72 |
DO 130 ID = ISID, IEID |
| 73 |
|
| 74 |
C --Determine if variable is needed |
| 75 |
|
| 76 |
NEED = .FALSE. |
| 77 |
DO 110 NP = 1, NLNCRV |
| 78 |
NEED = NEED .OR. (LOCINT (ID, NDIM, ILVID(1,NP)) .GT. 0) |
| 79 |
110 CONTINUE |
| 80 |
|
| 81 |
IF (NEED) THEN |
| 82 |
|
| 83 |
C --Read nodal/element variable |
| 84 |
|
| 85 |
CALL GETVAR (A, ID, -1, ISTEP, NWRDS, DATA) |
| 86 |
|
| 87 |
C --Scan plot variable information and store if a node/element |
| 88 |
C --point from this data is to be plotted |
| 89 |
|
| 90 |
DO 120 NP = 1, NLNCRV |
| 91 |
NE = ILVNE(NP) |
| 92 |
IF (ID .EQ. ILVID(1,NP)) XLN(NPT,NP) = DATA(NE) |
| 93 |
IF (ID .EQ. ILVID(2,NP)) YLN(NPT,NP) = DATA(NE) |
| 94 |
IF (NDIM .GE. 3) THEN |
| 95 |
IF (ID .EQ. ILVID(3,NP)) ZLN(NPT,NP) = DATA(NE) |
| 96 |
END IF |
| 97 |
120 CONTINUE |
| 98 |
END IF |
| 99 |
|
| 100 |
130 CONTINUE |
| 101 |
END IF |
| 102 |
|
| 103 |
RETURN |
| 104 |
END |