Debian Codegraph @

packages/seacas/applications/blot/mrknps.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 MRKNPS (HIDENP,
9 & XN, YN, ZN, IX2NP, IN2ELB, DODEAD, IDN2B,
10 & NNPSET, ISSNPS, IDNPS, NNNPS, IXNNPS, LTNNPS, *)
11 C=======================================================================
12
13 C --*** MRKNPS *** (SETS) Mark node set on mesh
14 C -- Written by Amy Gilkey - revised 04/08/88
15 C --
16 C --MRKNPS marks all the nodes in selected node sets on the mesh.
17 C --Each node is marked with an X in the color assigned to its node set.
18 C --
19 C --Parameters:
20 C -- HIDENP(i) - IN - true iff node i is hidden (3D only)
21 C -- XN, YN, ZN - IN - the nodal coordinates
22 C -- IX2NP - IN - the node number for each mesh index
23 C -- IN2ELB - IN - the element block for each node;
24 C -- <0 if not in any selected element block
25 C -- =0 if in more than one selected element block
26 C -- DODEAD - IN - mark dead nodes iff true
27 C -- IDN2B - IN - the element block for each dead node; dead if >= 0
28 C -- NNPSET - IN - the number of selected node sets
29 C -- ISSNPS - IN - the indices of the selected node sets
30 C -- IDNPS - IN - the node set ID for each set
31 C -- NNNPS - IN - the number of nodes for each set
32 C -- IXNNPS - IN - the index of the first node for each set
33 C -- LTNNPS - IN - the nodes for all sets
34 C -- * - return statement if the cancel function is active
35 C --
36 C --Common Variables:
37 C -- Uses NELBLK of /DBNUMS/
38 C -- Uses IS3DIM, NUMNPF of /D3NUMS/
39
40 PARAMETER (KHCHSZ=1, KSCHSZ=2)
41
42 common /debugc/ cdebug
43 common /debugn/ idebug
44 character*8 cdebug
45
46 include 'dbnums.blk'
47 include 'dbnumgq.blk'
48 include 'd3nums.blk'
49
50 LOGICAL HIDENP(*)
51 REAL XN(*), YN(*), ZN(*), NPFACT
52 INTEGER IX2NP(NUMNPF)
53 INTEGER IN2ELB(NUMNPF)
54 LOGICAL DODEAD
55 INTEGER IDN2B(NUMNPF)
56 INTEGER ISSNPS(*)
57 INTEGER IDNPS(*)
58 INTEGER NNNPS(*)
59 INTEGER IXNNPS(*)
60 INTEGER LTNNPS(*)
61
62 LOGICAL PLTGTT, PLTSTT, LDUM
63 logical logt
64
65 C --Set the symbol size, do not exit before resetting
66 LDUM = PLTGTT (KSCHSZ, SZSYM)
67 C If no sets are selected, return
68 IF (NNPSET .EQ. 0) THEN
69 RETURN
70 END IF
71
72 C sum the number of nodes for all selected node sets
73 ISUM = 0
74 DO 10 I = 1, NNPSET
75 ISUM = ISUM + NNNPS(ISSNPS(I))
76 10 CONTINUE
77
78 C compute the npfact
79 IF (ISUM .LT. 100) THEN
80 NPFACT = 1.0
81 ELSE IF (ISUM .GT. 2100) THEN
82 NPFACT = 0.40
83 ELSE
84 NPFACT = -0.0003 * ISUM + 1.03
85 END IF
86 LDUM = PLTSTT (KSCHSZ, NPFACT*SZSYM)
87
88 DO 110 IX = 1, NNPSET
89 INPS = ISSNPS(IX)
90
91 CALL GRCOLR (INPS)
92
93 IX0 = IXNNPS(INPS) - 1
94 DO 100 INE = 1, NNNPS(INPS)
95 INP = LTNNPS(IX0+INE)
96 IF (IS3DIM) THEN
97 IF (HIDENP(INP)) GOTO 100
98 END IF
99
100 logt = .false.
101 if (in2elb(inp) .ge. 0) then
102 logt = .true.
103 else if (DODEAD) then
104 if (IDN2B(inp) .GE. 0) logt = .true.
105 end if
106 if (logt) then
107 #if NeedsDoubleEscape
108 CALL MPD2SY (1, XN(INP), YN(INP), '\\CCI')
109 #else
110 CALL MPD2SY (1, XN(INP), YN(INP), '\CCI')
111 #endif
112 END IF
113 100 CONTINUE
114
115 CALL PLTFLU
116 110 CONTINUE
117
118 C --Reset the symbol size, do not exit before resetting
119 LDUM = PLTSTT (KSCHSZ, SZSYM)
120 RETURN
121
122 END