Debian Codegraph @

packages/seacas/applications/blot/qnpick.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 QNPICK (TYPE, ISUP, ISDEF,
9 & A, KXN, KYN, KZN, KHIDEN, KNPSUR)
10 C=======================================================================
11
12 C --*** QNPICK *** (MESH) Query last mesh display for node information
13 C -- Written by Amy Gilkey - revised 04/06/88
14 C --
15 C --QNPICK returns the address of the last displayed mesh characteristics
16 C --for cursor input. This routine assumes that the characteristics
17 C --are in dynamic memory.
18 C --
19 C --This routine uses MDFIND to find the following dynamic memory arrays:
20 C -- XN, YN, ZN - the nodal coordinates (ZN for 3D only)
21 C -- DHZ, DVT, DPD - the deformed nodal coordinates (DPD for 3D only)
22 C -- HIDENP - true iff node i is hidden (3D only)
23 C -- NPSURF - the node numbers of the surface nodes (3D only)
24 C --
25 C --Parameters:
26 C -- TYPE - IN - the type of mesh information needed:
27 C -- 'QUERY' - return ISUP and ISDEF only
28 C -- 'ORIGINAL' - original mesh coordinates
29 C -- 'DISPLAYED' - last displayed mesh coordinates
30 C -- ISUP - OUT - true iff a mesh is displayed
31 C -- ISDEF - OUT - true iff the displayed mesh is deformed
32 C -- A - IN - the dynamic memory base array
33 C -- KXN, KYN, KZN - OUT - the dynamic memory index of the coordinates
34 C -- requested (KZN in 3D only)
35 C -- KHIDEN - OUT - the dynamic memory index of the node hidden indicator
36 C -- (3D only)
37 C -- KNPSUR - OUT - the dynamic memory index of the surface node indices
38 C -- (3D only)
39 C --
40 C --Common Variables:
41 C -- Uses /PICK/
42 C -- Uses IS3DIM of /D3NUMS/
43
44 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6)
45
46 include 'pick.blk'
47 include 'd3nums.blk'
48
49 LOGICAL ISUP, ISDEF
50 CHARACTER*(*) TYPE
51
52 ISUP = INITP
53 IF (ISUP) THEN
54 ISDEF = PKDEF
55 ELSE
56 ISDEF = .FALSE.
57 END IF
58 KXN = 1
59 KYN = 1
60 KZN = 1
61 KHIDEN = 1
62 KNPSUR = 1
63
64 IF (TYPE .EQ. 'ORIGINAL') THEN
65 CALL MDFIND ('XN', KXN, IDUM)
66 CALL MDFIND ('YN', KYN, IDUM)
67 IF (IS3DIM) CALL MDFIND ('ZN', KZN, IDUM)
68 END IF
69
70 IF (ISUP) THEN
71 IF (TYPE .EQ. 'DISPLAYED') THEN
72 IF (.NOT. PKDEF) THEN
73 IF (.NOT. IS3DIM) THEN
74 CALL MDFIND ('XN', KXN, IDUM)
75 CALL MDFIND ('YN', KYN, IDUM)
76 IF (IS3DIM) CALL MDFIND ('ZN', KZN, IDUM)
77 ELSE
78 CALL MDFIND ('HZ', KXN, IDUM)
79 CALL MDFIND ('VT', KYN, IDUM)
80 IF (IS3DIM) CALL MDFIND ('PD', KZN, IDUM)
81 END IF
82 ELSE
83 CALL MDFIND ('DHZ', KXN, IDUM)
84 CALL MDFIND ('DVT', KYN, IDUM)
85 IF (IS3DIM) CALL MDFIND ('DPD', KZN, IDUM)
86 END IF
87 IF (IS3DIM) CALL MDFIND ('HIDENP', KHIDEN, IDUM)
88 IF (IS3DIM) CALL MDFIND ('NPSURF', KNPSUR, IDUM)
89 END IF
90 END IF
91
92 RETURN
93 END