Debian Codegraph @

packages/seacas/applications/blot/zmedge.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 ZMEDGE (XZMMIN, XZMMAX, YZMMIN, YZMMAX, XN, YN,
9 & IEDSET, NEDGES)
10 C=======================================================================
11
12 C --*** ZMEDGE *** (MESH) Delete edges outside zoom window
13 C -- Written by Amy Gilkey - revised 10/02/86
14 C --
15 C --ZMEDGE deletes edges with both nodes outside the zoom window,
16 C --and the line not crossing the zoom window.
17 C --
18 C --Parameters:
19 C -- XZMMIN, XZMMAX, YZMMIN, YZMMAX - IN - the box enclosing the
20 C -- zoom window
21 C -- XN, YN - IN - the nodal coordinates
22 C -- IEDSET - IN/OUT - the edge line set;
23 C -- (0) = face defining edge; 0 to delete edge
24 C -- NEDGES - IN - the number of lines in the edge set
25
26 common /debugc/ cdebug
27 common /debugn/ idebug
28 character*8 cdebug
29
30 REAL XN(*), YN(*)
31 INTEGER IEDSET(0:2,*)
32
33 nhid = 0
34 DO 100 IEDG = 1, NEDGES
35 IF (IEDSET(0,IEDG) .EQ. 0) GOTO 100
36
37 C --Delete edge if both nodes are outside zoom window
38
39 N1 = IEDSET(1,IEDG)
40 X1 = XN(N1)
41 Y1 = YN(N1)
42 IF ((X1 .LE. XZMMIN) .OR. (X1 .GE. XZMMAX)
43 & .OR. (Y1 .LE. YZMMIN) .OR. (Y1 .GE. YZMMAX)) THEN
44 N2 = IEDSET(2,IEDG)
45 X2 = XN(N2)
46 Y2 = YN(N2)
47 IF (((X1 .LE. XZMMIN) .AND. (X2 .LE. XZMMIN)) .OR.
48 & ((X1 .GE. XZMMAX) .AND. (X2 .GE. XZMMAX)) .OR.
49 & ((Y1 .LE. YZMMIN) .AND. (Y2 .LE. YZMMIN)) .OR.
50 & ((Y1 .GE. YZMMAX) .AND. (Y2 .GE. YZMMAX))) THEN
51 IEDSET(0,IEDG) = 0
52 nhid = nhid + 1
53 END IF
54 END IF
55
56 100 CONTINUE
57 if ((cdebug .eq. 'HIDDEN') .and. (idebug .ge. 1))
58 & write (*, '(1x,a,i5)') 'edges outside zoom window =', nhid
59
60 RETURN
61 END