Debian Codegraph @

packages/seacas/applications/blot/epaint.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 EPAINT (VARFAC, LENF, NLNKF, LINKF, NXFAC, IXFAC,
9 & XN, YN, ZN, ISVOK, FMIN, FMAX, *)
10 C=======================================================================
11
12 C --*** EPAINT *** (DETOUR) Paint element contours
13 C -- Written by Amy Gilkey - revised 03/07/88
14 C --
15 C --EPAINT paints contour sections in a color sequence. Each element
16 C --is assigned a single contour value (based on the element variable
17 C --value.
18 C --
19 C --The element block status indicates which element blocks are active
20 C --for contours. No contours are drawn in inactive elements.
21 C --
22 C --Parameters:
23 C -- VARFAC - IN - the contour function values
24 C -- LENF - IN - the cumulative face counts by element block
25 C -- NLNKF - IN - the number of nodes per face
26 C -- LINKF - IN - the connectivity for all faces
27 C -- NXFAC - IN - the number of ordered faces
28 C -- IXFAC - IN - the indices of the ordered faces
29 C -- XN, YN, ZN - IN - the nodal coordinates
30 C -- ISVOK - IN - ISVOK(i) is true iff the contour variable is defined
31 C -- for element block i (always true if nodal variable)
32 C -- FMIN, FMAX - IN - the minimum and maximum function value
33 C -- * - return statement if the cancel function is active
34 C --
35 C --Common Variables:
36 C -- Uses NELBLK of /DBNUMS/
37 C -- Uses IS3DIM of /D3NUMS/
38 C -- Uses NCNTR, NOCMIN, NOCMAX of /CNTR/
39
40 include 'dbnums.blk'
41 include 'd3nums.blk'
42 include 'cntr.blk'
43
44 REAL VARFAC(*)
45 INTEGER LENF(0:NELBLK)
46 INTEGER NLNKF(NELBLK)
47 INTEGER LINKF(*)
48 INTEGER IXFAC(*)
49 REAL XN(*), YN(*), ZN(*)
50 LOGICAL ISVOK(NELBLK)
51
52 LOGICAL GRABRT
53
54 C --Fill the CINTV array with the contour intervals
55
56 IF (.NOT. CINTOK) THEN
57 DO 100 NC = 1, NCNTR+1
58 CINTV(NC) = CNTRI (NC)
59 100 CONTINUE
60 END IF
61
62 DO 110 IX = 1, NXFAC
63 IFAC = IXFAC(IX)
64 IELB = 0
65 IXL = IDBLNK (IELB, IFAC, LENF, NLNKF)
66 IF (NLNKF(IELB) .GT. 2) THEN
67
68 IF ((.NOT. IS3DIM) .AND. (NLNKF(IELB) .EQ. 9)) THEN
69 NNPF = 8
70 ELSE
71 NNPF = NLNKF(IELB)
72 ENDIF
73 IF (ISVOK(IELB)) THEN
74
75 C --Find contour interval
76 IF (DELC .GE. 0.0) THEN
77 NC = LOCREA (VARFAC(IFAC), NCNTR+1, CINTV)
78 IF (VARFAC(IFAC) .LT. CINTV(NC)) NC = NC - 1
79 ELSE
80 NC = LOCREA (VARFAC(IFAC), NCNTR+1, CINTV)
81 IF (VARFAC(IFAC) .GE. CINTV(NC)) NC = NC - 1
82 END IF
83
84 IF (NOCMIN .AND. (NC .LT. 1)) NC = 1
85 IF (NOCMAX .AND. (NC .GT. NCNTR)) NC = NCNTR
86 IF ((NC .LT. 1) .OR. (NC .GT. NCNTR)) NC = -1
87
88 ELSE
89 C --Not selected, paint face black
90 NC = -1
91 END IF
92
93 C --Face is entirely inside one contour area
94
95 IF (GRABRT ()) RETURN 1
96 CALL GRCOLR (NC)
97 CALL SOLIDF (NNPF, LINKF(IXL), XN, YN, ZN)
98
99 END IF
100 110 CONTINUE
101
102 CALL PLTFLU
103
104 RETURN
105 END