| 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 NEWINI (IDNSUR, IDESUR, NSSUR, NESUR, BLKTYP, IBPARM) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** NEWINI *** (GEN3D) Calculate 3D initial variables |
| 12 |
C -- Written by Amy Gilkey - revised 09/02/87 |
| 13 |
C -- |
| 14 |
C --NEWINI calculates the initial variables for the 3D database. |
| 15 |
C --The output number of nodes and elements and the length of the node |
| 16 |
C --sets and the side sets must be calculated before NEWINI is called. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- IDNSUR - IN - the number of surface node sets |
| 20 |
C -- IDESUR - IN - the number of surface side sets |
| 21 |
C -- NSSUR - IN - the number of nodes in the surface side set |
| 22 |
C -- NESUR - IN - the number of elements in the surface side set |
| 23 |
C -- BLKTYP - IN - the element block type |
| 24 |
C -- IBPARM - IN - the block parameters (defined by the block type) |
| 25 |
C -- |
| 26 |
C --Common Variables: |
| 27 |
C -- Uses NDIM, NUMNP, NUMEL, NELBLK, |
| 28 |
C -- NUMNPS, LNPSNL, NUMESS, LESSEL, LESSNL of /DBNUMS/ |
| 29 |
C -- Uses NUMNP3, NUMEL3, LNPSN3, LESSE3, LESSN3 of /DBNUM3/ |
| 30 |
C -- Uses LNPSNO, LESSEO, LESSNO of /DBNUM3/ |
| 31 |
C -- Sets NUMNP3, NDIM3, NUMEL3, NELBL3, |
| 32 |
C -- NNPS3, LNPSN3, NESS3, LESSE3, LESSN3 of /DBNUM3/ |
| 33 |
C -- Uses NNREPL, NEREPL of /PARAMS/ |
| 34 |
|
| 35 |
INCLUDE 'g3_dbtitl.blk' |
| 36 |
INCLUDE 'g3_dbnums.blk' |
| 37 |
INCLUDE 'g3_dbnum3.blk' |
| 38 |
INCLUDE 'g3_params.blk' |
| 39 |
|
| 40 |
CHARACTER BLKTYP(NELBLK) |
| 41 |
INTEGER IBPARM(4,NELBLK) |
| 42 |
|
| 43 |
C --Database title - unchanged |
| 44 |
|
| 45 |
CONTINUE |
| 46 |
|
| 47 |
C --Number of dimensions |
| 48 |
|
| 49 |
NDIM3 = 3 |
| 50 |
|
| 51 |
C --Number of nodes and elements, set by RENUMB |
| 52 |
|
| 53 |
CONTINUE |
| 54 |
|
| 55 |
C --Number of element blocks |
| 56 |
|
| 57 |
NELBL3 = 0 |
| 58 |
DO 30 IELB = 1, NELBLK |
| 59 |
IF (BLKTYP(IELB) .EQ. 'T') THEN |
| 60 |
NRSTRT = 1 |
| 61 |
NREND = IBPARM(1,IELB) - 1 |
| 62 |
NBLK = 1 |
| 63 |
10 CONTINUE |
| 64 |
NRSTRT = NREND + 1 |
| 65 |
IF (NRSTRT .LE. IBPARM(2,IELB)) THEN |
| 66 |
NREND = MIN (IBPARM(2,IELB), NREND + IBPARM(3,IELB)) |
| 67 |
ELSE |
| 68 |
NREND = NEREPL |
| 69 |
END IF |
| 70 |
NBLK = NBLK + 1 |
| 71 |
IF (NREND .LT. NEREPL) GOTO 10 |
| 72 |
IBPARM(4,IELB) = NBLK |
| 73 |
NELBL3 = NELBL3 + NBLK |
| 74 |
|
| 75 |
ELSE IF (BLKTYP(IELB) .EQ. 'S') THEN |
| 76 |
NBLK = 1 |
| 77 |
NR = NRTRAN(NBLK) |
| 78 |
20 CONTINUE |
| 79 |
IF (NEREPL .GT. NR) THEN |
| 80 |
NBLK = NBLK + 1 |
| 81 |
NR = NR + NRTRAN(NBLK) |
| 82 |
GOTO 20 |
| 83 |
END IF |
| 84 |
IBPARM(4,IELB) = NBLK |
| 85 |
NELBL3 = NELBL3 + NBLK |
| 86 |
|
| 87 |
ELSE |
| 88 |
NELBL3 = NELBL3 + 1 |
| 89 |
END IF |
| 90 |
30 CONTINUE |
| 91 |
|
| 92 |
C --Lengths of node sets set by NEWNPS |
| 93 |
C --Lengths of side sets set by NEWESS |
| 94 |
|
| 95 |
C --LNPSN3 = LNPSNL * NNREPL |
| 96 |
C --LESSE3 = LESSEL * NEREPL |
| 97 |
C --LESSN3 = LESSE3 * 2 |
| 98 |
|
| 99 |
C --Number and lengths of sets, including front and back sets |
| 100 |
|
| 101 |
NNPS3 = NUMNPS + IDNSUR |
| 102 |
LNPSN3 = LNPSNO + IDNSUR*NUMNP |
| 103 |
|
| 104 |
NESS3 = NUMESS + IDESUR |
| 105 |
LESSE3 = LESSEO + IDESUR*NESUR |
| 106 |
LESSN3 = LESSNO + IDESUR*NSSUR |
| 107 |
|
| 108 |
RETURN |
| 109 |
END |