| 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 HIDSET (LINSET, LENL, HIDENP, ALLHOL, IELBST, |
| 9 |
& IEDSET, NEDGES, IPSET, NPART) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** HIDSET *** (MESH) Identify partial line set |
| 13 |
C -- Written by Amy Gilkey - revised 10/02/86 |
| 14 |
C -- |
| 15 |
C --HIDSET identifies those lines which connect visible to hidden nodes |
| 16 |
C --overlapped by a face (versus hidden nodes with the normal |
| 17 |
C --pointing away). The hidden nodes are moved to LINSET(2,x) and a |
| 18 |
C --list of indices into the LINSET array is made up. |
| 19 |
C -- |
| 20 |
C --Parameters: |
| 21 |
C -- LINSET - IN/OUT - the sorted line set |
| 22 |
C -- LENL - IN - the length of the line set, for each element block |
| 23 |
C -- HIDENP - IN - node status (as in HIDDEN) |
| 24 |
C -- ALLHOL - IN - true iff mesh display is hollow |
| 25 |
C -- IELBST - IN - the element block status (>0 if selected) |
| 26 |
C -- IEDSET - IN - the edge line set; (0) = face defining edge |
| 27 |
C -- NEDGES - IN - the number of edges |
| 28 |
C -- IPSET - OUT - the indices of the partial line set |
| 29 |
C -- NPART - OUT - the number of lines in the partial line set |
| 30 |
C -- |
| 31 |
C --Common Variables: |
| 32 |
C -- Uses NELBLK of /DBNUMS/ |
| 33 |
C -- Uses LLNSET of /D3NUMS/ |
| 34 |
|
| 35 |
PARAMETER (KNVIS=0, KNFOVR=10, KNHID=100) |
| 36 |
|
| 37 |
common /debugc/ cdebug |
| 38 |
common /debugn/ idebug |
| 39 |
character*8 cdebug |
| 40 |
|
| 41 |
include 'dbnums.blk' |
| 42 |
include 'd3nums.blk' |
| 43 |
|
| 44 |
INTEGER LENL(-2:NELBLK) |
| 45 |
INTEGER LINSET(LLNSET,*) |
| 46 |
INTEGER HIDENP(*) |
| 47 |
LOGICAL ALLHOL |
| 48 |
INTEGER IELBST(NELBLK) |
| 49 |
INTEGER IEDSET(0:2,*) |
| 50 |
INTEGER IPSET(*) |
| 51 |
|
| 52 |
LOGICAL EDGONL |
| 53 |
|
| 54 |
C --Get all line sets that are partially hidden, put the hidden node |
| 55 |
C --in LINSET(2,x) |
| 56 |
|
| 57 |
NPART = 0 |
| 58 |
DO 140 IELB = -1, NELBLK |
| 59 |
|
| 60 |
C --Flag whether partial lines of this element block must be in the |
| 61 |
C --edge set |
| 62 |
|
| 63 |
EDGONL = .FALSE. |
| 64 |
IF (IELB .GE. 1) THEN |
| 65 |
IF (ALLHOL .OR. (IELBST(IELB) .LE. 0)) EDGONL = .TRUE. |
| 66 |
END IF |
| 67 |
|
| 68 |
DO 130 IL = LENL(IELB-1)+1, LENL(IELB) |
| 69 |
IF ((HIDENP(LINSET(1,IL)) .LE. KNVIS) .OR. |
| 70 |
& (HIDENP(LINSET(2,IL)) .LE. KNVIS)) THEN |
| 71 |
IF ((HIDENP(LINSET(1,IL)) .EQ. KNFOVR) .OR. |
| 72 |
& (HIDENP(LINSET(2,IL)) .EQ. KNFOVR)) THEN |
| 73 |
|
| 74 |
C --Get hidden node in LINSET(2,x) |
| 75 |
IF (HIDENP(LINSET(1,IL)) .GT. KNVIS) THEN |
| 76 |
I = LINSET(1,IL) |
| 77 |
LINSET(1,IL) = LINSET(2,IL) |
| 78 |
LINSET(2,IL) = I |
| 79 |
END IF |
| 80 |
|
| 81 |
IF (EDGONL) THEN |
| 82 |
C --Eliminate the partial line if not in the edge set |
| 83 |
IV = LINSET(1,IL) |
| 84 |
IH = LINSET(2,IL) |
| 85 |
DO 100 IEDG = 1, NEDGES |
| 86 |
IF (IV .EQ. IEDSET(1,IEDG)) THEN |
| 87 |
IF (IH .EQ. IEDSET(2,IEDG)) GOTO 110 |
| 88 |
END IF |
| 89 |
100 CONTINUE |
| 90 |
GOTO 120 |
| 91 |
110 CONTINUE |
| 92 |
END IF |
| 93 |
|
| 94 |
C --Add the line to the partial line set |
| 95 |
NPART = NPART + 1 |
| 96 |
IPSET(NPART) = IL |
| 97 |
120 CONTINUE |
| 98 |
END IF |
| 99 |
END IF |
| 100 |
130 CONTINUE |
| 101 |
140 CONTINUE |
| 102 |
if ((cdebug .eq. 'HIDDEN') .and. (idebug .ge. 1)) |
| 103 |
& write (*, '(1x,a,i5)') 'partial line set =', npart |
| 104 |
|
| 105 |
RETURN |
| 106 |
END |