| 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 FNPCEN (LINK, N4, NUMCOL, NEROW, IELCEN, |
| 9 |
& IRBOT, IRTOP, NUMROW, NPCEN, NREL, IELCOL, NRNP, NRBOT, NRTOP) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** FNPCEN *** (GEN3D) Compute center block row x column nodes |
| 13 |
C -- Written by Amy Gilkey - revised 04/26/88 |
| 14 |
C -- Modified by Greg Sjaardema, 07/06/90 |
| 15 |
C -- Problem with noncontiguous material blocks in center |
| 16 |
C -- blocks. (ie. Slidelines separating materials.) |
| 17 |
C -- Problem not fixed, error checking enabled. |
| 18 |
C -- Problem is in setting node numbers in NPCEN. |
| 19 |
C -- |
| 20 |
C --FNPCEN sets the number of elements generated by each element (if the |
| 21 |
C --column is within NUMCOL), and returns the nodes by row and column. |
| 22 |
C -- |
| 23 |
C --Parameters: |
| 24 |
C -- LINK - IN - the connectivity for the 2D elements, always 4 nodes |
| 25 |
C -- N4 - IN - the number of quadrants |
| 26 |
C -- NUMCOL - IN - the number of columns in the center blocks |
| 27 |
C -- NEROW - IN - the number of element rows in the center blocks |
| 28 |
C -- IELCEN - IN - the element numbers of the center elements |
| 29 |
C -- by column and row |
| 30 |
C -- IRBOT, IRTOP - IN - the row number of the row on top and bottom |
| 31 |
C -- NUMROW - OUT - the number of nodal rows in the center blocks |
| 32 |
C -- NPCEN - OUT - the node numbers of the center nodes by column and row |
| 33 |
C -- NREL - IN/OUT - the number of new elements generated for each element |
| 34 |
C -- IELCOL - IN/OUT - the row number for each element |
| 35 |
C -- NRNP - IN/OUT - the number of new nodes generated for each node |
| 36 |
C -- NRBOT, NRTOP - SCRATCH - size = NEROW |
| 37 |
C -- |
| 38 |
C --Common Variables: |
| 39 |
C -- Uses IX1, IX2, IX3, IX4 of /CENPAR/ |
| 40 |
|
| 41 |
INCLUDE 'g3_cenpar.blk' |
| 42 |
|
| 43 |
INTEGER LINK(4,*) |
| 44 |
INTEGER NPCEN(NUMCOL,*) |
| 45 |
INTEGER IELCEN(NUMCOL,*) |
| 46 |
INTEGER IRBOT(*), IRTOP(*) |
| 47 |
INTEGER NREL(*), IELCOL(*) |
| 48 |
INTEGER NRNP(*) |
| 49 |
INTEGER NRBOT(*), NRTOP(*) |
| 50 |
|
| 51 |
C --The number of elements generated for center elements is dependent on |
| 52 |
C --the column |
| 53 |
|
| 54 |
DO 20 ICOL = 1, MAX (NUMCOL-1, 1) |
| 55 |
NR = (ICOL*2-1) * N4 |
| 56 |
DO 10 IROW = 1, NEROW |
| 57 |
IEL = IELCEN(ICOL,IROW) |
| 58 |
IF (IEL .LE. 0) GOTO 10 |
| 59 |
NREL(IEL) = NR |
| 60 |
IELCOL(IEL) = ICOL |
| 61 |
10 CONTINUE |
| 62 |
20 CONTINUE |
| 63 |
|
| 64 |
C --Fill in the node rows, checking if bottom or top row has already been |
| 65 |
C --inserted |
| 66 |
|
| 67 |
CALL INIINT (NEROW, 0, NRBOT) |
| 68 |
CALL INIINT (NEROW, 0, NRTOP) |
| 69 |
|
| 70 |
NUMROW = 0 |
| 71 |
DO 40 IROW = 1, NEROW |
| 72 |
IBOT = NRBOT(IROW) |
| 73 |
IF (IBOT .EQ. 0) THEN |
| 74 |
NUMROW = NUMROW + 1 |
| 75 |
IBOT = NUMROW |
| 76 |
IF (IRBOT(IROW) .GT. 0) NRTOP(IRBOT(IROW)) = IBOT |
| 77 |
END IF |
| 78 |
ITOP = NRTOP(IROW) |
| 79 |
IF (ITOP .EQ. 0) THEN |
| 80 |
NUMROW = NUMROW + 1 |
| 81 |
ITOP = NUMROW |
| 82 |
IF (IRTOP(IROW) .GT. 0) NRBOT(IRTOP(IROW)) = ITOP |
| 83 |
END IF |
| 84 |
|
| 85 |
DO 30 ICOL = 1, NUMCOL |
| 86 |
IEL = IELCEN(ICOL,IROW) |
| 87 |
IF (IEL .LE. 0) GOTO 30 |
| 88 |
INP = LINK(IX1,IEL) |
| 89 |
IF (NPCEN(ICOL,IBOT) .NE. 0 .AND. |
| 90 |
$ NPCEN(ICOL,IBOT) .NE. INP) THEN |
| 91 |
CALL PRTERR ('FATAL', |
| 92 |
$ 'Center blocks must be contiguous') |
| 93 |
CALL PRTERR ('CMDSPEC', |
| 94 |
$ 'Slidelines are not allowed') |
| 95 |
STOP 'CENTER BLOCK NONCONTIGUOUS' |
| 96 |
ELSE |
| 97 |
NPCEN(ICOL,IBOT) = INP |
| 98 |
END IF |
| 99 |
INP = LINK(IX4,IEL) |
| 100 |
IF (NPCEN(ICOL,ITOP) .NE. 0 .AND. |
| 101 |
$ NPCEN(ICOL,ITOP) .NE. INP) THEN |
| 102 |
CALL PRTERR ('FATAL', |
| 103 |
$ 'Center blocks must be contiguous') |
| 104 |
CALL PRTERR ('CMDSPEC', |
| 105 |
$ 'Slidelines are not allowed') |
| 106 |
STOP 'CENTER BLOCK NONCONTIGUOUS' |
| 107 |
ELSE |
| 108 |
NPCEN(ICOL,ITOP) = INP |
| 109 |
END IF |
| 110 |
30 CONTINUE |
| 111 |
40 CONTINUE |
| 112 |
|
| 113 |
C --The number of nodes generated for center nodes is dependent on |
| 114 |
C --the column |
| 115 |
|
| 116 |
DO 70 ICOL = 1, MAX (NUMCOL, 1) |
| 117 |
IF (ICOL .EQ. 1) THEN |
| 118 |
NR = 1 |
| 119 |
ELSE IF (N4 .EQ. 4) THEN |
| 120 |
NR = (ICOL-1) * 2 * N4 |
| 121 |
ELSE |
| 122 |
NR = (ICOL-1) * 2 * N4 + 1 |
| 123 |
END IF |
| 124 |
DO 60 IROW = 1, NUMROW |
| 125 |
INP = NPCEN(ICOL,IROW) |
| 126 |
IF (INP .EQ. 0) GOTO 60 |
| 127 |
NRNP(INP) = NR |
| 128 |
60 CONTINUE |
| 129 |
70 CONTINUE |
| 130 |
|
| 131 |
RETURN |
| 132 |
END |