Debian Codegraph @

packages/seacas/applications/blot/msflag.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 MSFLAG (ANYDEF, ANYUND,
9 & DOIXF, DON2B, DOELED, DOELEU, DODEAD, DONPS, DOESS, DOSCAL,
10 & MINMSH, MAXMSH, MAXHID)
11 C=======================================================================
12
13 C --*** MSFLAG *** (MESH) Set mesh plot flags
14 C -- Written by Amy Gilkey - revised 05/31/88
15 C --
16 C --MSFLAG sets the flags needed to plot a mesh.
17 C --
18 C --Parameters:
19 C -- ANYDEF - OUT - true iff any deformed mesh is to be plotted
20 C -- ANYUND - OUT - true iff any undeformed mesh is to be plotted
21 C -- DOIXF - OUT - true iff the IXFAC array is needed
22 C -- DON2B - OUT - true iff the IN2ELB array is needed
23 C -- DOELED - OUT - true iff the deformed element quarilateral centers
24 C -- are needed
25 C -- DOELEU - OUT - true iff the undeformed element quarilateral centers
26 C -- are needed
27 C -- DODEAD - OUT - true iff dead nodes are needed
28 C -- DONPS - OUT - true iff node set information is needed
29 C -- DOESS - OUT - true iff side set information is needed
30 C -- DOSCAL - OUT - true iff the zoom window limits need to be calculated
31 C -- MINMSH, MAXMSH - OUT - the minimum and maximum mesh line types
32 C -- to be displayed
33 C -- MAXHID - OUT - the maximum hidden line option
34 C --
35 C --Common Variables:
36 C -- Uses IS3DIM of /D3NUMS/
37 C -- Uses DFAC of /DEFORM/
38 C -- Uses MSHDEF, MSHNUM, MSHLIN, IHIDOP, NALVAR, DEADNP of /MSHOPT/
39 C -- Uses MSCTYP of /MSHLIM/
40
41 PARAMETER (MSHNON=0, MSHBOR=1, MSHDIV=2, MSHSEL=3, MSHALL=4)
42
43 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6)
44
45 include 'dbnums.blk'
46 include 'd3nums.blk'
47 include 'deform.blk'
48 include 'mshopt.blk'
49 include 'mshlim.blk'
50
51 LOGICAL ANYDEF, ANYUND
52 LOGICAL DOIXF, DON2B, DOELED, DOELEU, DODEAD, DONPS, DOESS, DOSCAL
53
54 INTEGER NUMMOD, NDEFVW, IXVW
55
56 C --Set up calculation flags
57
58 ANYDEF = (NUMMOD (MSHDEF, ' ', 'DEFORM', ' ') .GE. 1)
59 ANYUND = (NUMMOD (MSHDEF, ' ', 'UNDEFORM', ' ') .GE. 1)
60 IF (DFAC .EQ. 0.0) THEN
61 ANYUND = .TRUE.
62 ANYDEF = .FALSE.
63 END IF
64
65 DOIXF = .FALSE.
66
67 DON2B = (NUMMOD (MSHDEF, MSHNUM, 'DEFORM', 'NODE') .GE. 1)
68 & .OR. (NUMMOD (MSHDEF, MSHNUM, 'DEFORM', 'ALL') .GE. 1)
69 & .OR. (NUMMOD (MSHDEF, MSHNUM, 'UNDEFORM', 'NODE') .GE. 1)
70 & .OR. (NUMMOD (MSHDEF, MSHNUM, 'UNDEFORM', 'ALL') .GE. 1)
71
72 DOELED = (NUMMOD (MSHDEF, MSHNUM, 'DEFORM', 'ELEMENT') .GE. 1)
73 & .OR. (NUMMOD (MSHDEF, MSHNUM, 'DEFORM', 'ALL') .GE. 1)
74 DOELEU = (NUMMOD (MSHDEF, MSHNUM, 'UNDEFORM', 'ELEMENT') .GE. 1)
75 & .OR. (NUMMOD (MSHDEF, MSHNUM, 'UNDEFORM', 'ALL') .GE. 1)
76 IF (.NOT. ANYDEF) THEN
77 IF (DOELED) DOELEU = .TRUE.
78 DOELED = .FALSE.
79 END IF
80
81 DODEAD = (NALVAR .GT. 0) .AND. DEADNP
82
83 DONPS = .FALSE.
84 DOESS = .FALSE.
85 DO 100 IVW = 1, NDEFVW (.FALSE.)
86 IVIEW = IXVW (.FALSE., IVW)
87 DONPS = DONPS .OR. (NNPSET(IVIEW) .GT. 0)
88 DOESS = DOESS .OR. (NESSET(IVIEW) .GT. 0)
89 100 CONTINUE
90
91 DOSCAL = (MSCTYP .EQ. 'EACH')
92
93 IF (IS3DIM) THEN
94 MAXHID = IHIDOP
95 MINMSH = 999
96 MAXMSH = 0
97 DO 110 IVW = 1, NDEFVW (.FALSE.)
98 IVIEW = IXVW (.FALSE., IVW)
99 MINMSH = MIN (MINMSH, MSHLIN(IVIEW))
100 MAXMSH = MAX (MAXMSH, MSHLIN(IVIEW))
101 110 CONTINUE
102 END IF
103
104 RETURN
105 END