| 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 NEWESS (IDFRO, IDBCK, NSSUR, NLINK, LINK, |
| 9 |
& ISSFRO, ISSBCK, NSSFRO, NSSBCK) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** NEWESS *** (GEN3D) Calculate 3D side sets |
| 13 |
C -- Written by Amy Gilkey - revised 01/12/88 |
| 14 |
C -- |
| 15 |
C --NEWESS calculates the side set information for the 3D database. |
| 16 |
C --The elements in the front and back side sets are not calculated |
| 17 |
C --(since they are easily derived), and they are not included in the |
| 18 |
C --length tally. The nodes in the front and back node sets are |
| 19 |
C --calculated, and their number is returned, but they are not included |
| 20 |
C --in the length tally. |
| 21 |
C -- |
| 22 |
C --Parameters: |
| 23 |
C -- IDFRO - IN - ids for front surface side sets; (0) = length |
| 24 |
C -- IDBCK - IN - ids for back surface side sets; (0) = length |
| 25 |
C -- LINK - IN - the connectivity for the 2D elements |
| 26 |
C -- ISSFRO - OUT - the elements in the front surface side set |
| 27 |
C -- ISSBCK - OUT - the elements in the back surface side set |
| 28 |
C -- NSSUR - OUT - the number of nodes in the surface side set |
| 29 |
C -- NSSFRO - OUT - the nodes in the front surface side set |
| 30 |
C -- NSSBCK - OUT - the nodes in the back surface side set |
| 31 |
C -- |
| 32 |
C --Common Variables: |
| 33 |
C -- Uses NDBOUT of /DBASE/ |
| 34 |
C -- Uses NUMESS, LESSEL, LESSNL of /DBNUMS/ |
| 35 |
C -- Sets LESSEO, LESSNO of /DBNUM3/ |
| 36 |
C -- Uses NNREPL, NEREPL, DIM3 of /PARAMS/ |
| 37 |
|
| 38 |
INCLUDE 'gs_dbase.blk' |
| 39 |
INCLUDE 'gs_dbnums.blk' |
| 40 |
INCLUDE 'gs_dbnum3.blk' |
| 41 |
INCLUDE 'gs_params.blk' |
| 42 |
|
| 43 |
INTEGER IDFRO(0:*) |
| 44 |
INTEGER IDBCK(0:*) |
| 45 |
INTEGER LINK(NLINK,*) |
| 46 |
INTEGER ISSFRO(NUMEL), ISSBCK(NUMEL) |
| 47 |
INTEGER NSSFRO(*), NSSBCK(*) |
| 48 |
INTEGER LTMP(9) |
| 49 |
|
| 50 |
NFRO = IDFRO(0) |
| 51 |
NBCK = IDBCK(0) |
| 52 |
|
| 53 |
C --Side set ids - unchanged |
| 54 |
|
| 55 |
CONTINUE |
| 56 |
|
| 57 |
C --Side set elements - unchanged |
| 58 |
|
| 59 |
C --Side set nodes and distribution factors - unchanged |
| 60 |
|
| 61 |
C --Number of elements in each set |
| 62 |
|
| 63 |
C --Number of nodes in each set |
| 64 |
|
| 65 |
C --Number of elements in all sets |
| 66 |
|
| 67 |
C --Number of nodes in all sets |
| 68 |
|
| 69 |
C --Set up elements and nodes for front and back side sets |
| 70 |
|
| 71 |
NFRO = IDFRO(0) |
| 72 |
NBCK = IDBCK(0) |
| 73 |
|
| 74 |
NSSUR = 0 |
| 75 |
IF ((NFRO .GT. 0) .OR. (NBCK .GT. 0)) THEN |
| 76 |
N = 0 |
| 77 |
DO 150 JEL = 1, NUMEL |
| 78 |
IF (NFRO .GT. 0) ISSFRO(JEL) = JEL |
| 79 |
IF (NBCK .GT. 0) ISSBCK(JEL) = JEL |
| 80 |
|
| 81 |
DO 140 I = 1, NLINK |
| 82 |
LTMP(I) = LINK(I,JEL) |
| 83 |
140 CONTINUE |
| 84 |
IF (NFRO .GT. 0) THEN |
| 85 |
NSSFRO(N+1) = LTMP(1) |
| 86 |
NSSFRO(N+2) = LTMP(2) |
| 87 |
NSSFRO(N+3) = LTMP(3) |
| 88 |
NSSFRO(N+4) = LTMP(4) |
| 89 |
END IF |
| 90 |
C ... NOTE: Back sidesets must be in reverse order |
| 91 |
IF (NBCK .GT. 0) THEN |
| 92 |
NSSBCK(N+1) = LTMP(4) |
| 93 |
NSSBCK(N+2) = LTMP(3) |
| 94 |
NSSBCK(N+3) = LTMP(2) |
| 95 |
NSSBCK(N+4) = LTMP(1) |
| 96 |
END IF |
| 97 |
IF (NLINK .EQ. 8 .OR. NLINK .EQ. 9) THEN |
| 98 |
IF (NFRO .GT. 0) THEN |
| 99 |
NSSFRO(N+5) = LTMP(5) |
| 100 |
NSSFRO(N+6) = LTMP(6) |
| 101 |
NSSFRO(N+7) = LTMP(7) |
| 102 |
NSSFRO(N+8) = LTMP(8) |
| 103 |
END IF |
| 104 |
C ... NOTE: Back sidesets must be in reverse order |
| 105 |
IF (NBCK .GT. 0) THEN |
| 106 |
NSSBCK(N+5) = LTMP(7) |
| 107 |
NSSBCK(N+6) = LTMP(6) |
| 108 |
NSSBCK(N+7) = LTMP(5) |
| 109 |
NSSBCK(N+8) = LTMP(8) |
| 110 |
END IF |
| 111 |
IF (NLINK .EQ. 9) THEN |
| 112 |
IF (NFRO .GT. 0) NSSFRO(N+9) = LTMP(9) |
| 113 |
IF (NBCK .GT. 0) NSSBCK(N+9) = LTMP(9) |
| 114 |
END IF |
| 115 |
END IF |
| 116 |
N = N + NLINK |
| 117 |
150 CONTINUE |
| 118 |
NSSUR = N |
| 119 |
END IF |
| 120 |
|
| 121 |
RETURN |
| 122 |
END |