| 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 WRESS (A, IA, IDFRO, IDBCK, |
| 9 |
& ISSFRO, ISSBCK, NSSUR, NSSFRO, NSSBCK, |
| 10 |
& IDESS, NEES3, NNES3, IXEES3, IXNES3, LTEES3, LTSSS3, FACES3, *) |
| 11 |
C======================================================================= |
| 12 |
|
| 13 |
C --*** WRESS *** (GEN3D) Write 3D node sets |
| 14 |
C -- Written by Amy Gilkey - revised 05/05/86 |
| 15 |
C -- |
| 16 |
C --WRESS writes the side set information for the 3D database. |
| 17 |
C --Calculations have been done elsewhere. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- IDFRO - IN - ids for front surface side sets; (0) = length |
| 21 |
C -- IDBCK - IN - ids for back surface side sets; (0) = length |
| 22 |
C -- ISSFRO - IN - the elements in the front surface side set |
| 23 |
C -- ISSBCK - IN - the elements in the back surface side set |
| 24 |
C -- NSSUR - IN - the number of nodes in the surface side set |
| 25 |
C -- NSSFRO - IN - the nodes in the front surface side set |
| 26 |
C -- NSSBCK - IN - the nodes in the back surface side set |
| 27 |
C -- IDESS - IN - the ids for each 2D set |
| 28 |
C -- NEES3 - IN - the number of elements for each 3D set |
| 29 |
C -- NNES3 - IN - the number of nodes for each 3D set |
| 30 |
C -- IXEES3 - IN - the index of the first element for each 3D set |
| 31 |
C -- IXNES3 - IN - the index of the first node for each 3D set |
| 32 |
C -- LTEES3 - IN - the elements for all 3D sets |
| 33 |
C -- LTSSS3 - IN - the element sides for all 3D sets |
| 34 |
C -- FACES3 - IN - the distribution factors for all 3D sets |
| 35 |
C -- |
| 36 |
C --Common Variables: |
| 37 |
C -- Uses NDBOUT of /DBASE/ |
| 38 |
C -- Uses NUMESS, LESSEL, LESSNL of /DBNUMS/ |
| 39 |
C -- Uses LESSEO, LESSNO of /DBNUM3/ |
| 40 |
C -- Uses NNREPL, NEREPL of /PARAMS/ |
| 41 |
|
| 42 |
include 'exodusII.inc' |
| 43 |
INCLUDE 'gs_dbase.blk' |
| 44 |
INCLUDE 'gs_dbnums.blk' |
| 45 |
INCLUDE 'gs_dbnum3.blk' |
| 46 |
|
| 47 |
REAL A(*) |
| 48 |
INTEGER IA(*) |
| 49 |
INTEGER IDFRO(0:*) |
| 50 |
INTEGER IDBCK(0:*) |
| 51 |
INTEGER ISSFRO(NUMEL), ISSBCK(NUMEL) |
| 52 |
INTEGER NSSFRO(*), NSSBCK(*) |
| 53 |
INTEGER IDESS(*) |
| 54 |
INTEGER NEES3(*) |
| 55 |
INTEGER NNES3(*) |
| 56 |
INTEGER IXEES3(*) |
| 57 |
INTEGER IXNES3(*) |
| 58 |
INTEGER LTEES3(*) |
| 59 |
INTEGER LTSSS3(*) |
| 60 |
REAL FACES3(*) |
| 61 |
|
| 62 |
LOGICAL ANYESS |
| 63 |
|
| 64 |
NFRO = IDFRO(0) |
| 65 |
NBCK = IDBCK(0) |
| 66 |
ANYESS = (NFRO .GT. 0) .OR. (NBCK .GT. 0) .OR. (NUMESS .GT. 0) |
| 67 |
|
| 68 |
C --Write 3D Sidesets |
| 69 |
IF (.NOT. ANYESS) RETURN |
| 70 |
|
| 71 |
C Each sideset has numel elements and faces, and NSSUR distribution factors |
| 72 |
if ((nfro .gt. 0) .or. (nbck .gt. 0)) then |
| 73 |
C ... Allocate array to store side data for front and/or back sidesets |
| 74 |
call mdrsrv('LSTSID', klst, numel) |
| 75 |
C ... Allocate array for distribution factors |
| 76 |
call mdrsrv('DISTF', kdistf, nssur) |
| 77 |
call mdstat(nerr, mem) |
| 78 |
if (nerr .gt. 0) go to 400 |
| 79 |
call inirea(nssur, 1.0, a(kdistf)) |
| 80 |
|
| 81 |
C ... Write Front Sidesets |
| 82 |
if (nfro .gt. 0) then |
| 83 |
C ... Fill the side list |
| 84 |
call iniint(numel, 1, ia(klst)) |
| 85 |
end if |
| 86 |
do 100 i=1, nfro |
| 87 |
call expsp (ndbout, idfro(i), numel, nssur, ierr) |
| 88 |
call expss (ndbout, idfro(i), issfro, ia(klst), ierr) |
| 89 |
call expssd (ndbout, idfro(i), a(kdistf), ierr) |
| 90 |
100 continue |
| 91 |
|
| 92 |
C ... Write Back Sidesets |
| 93 |
if (nbck .gt. 0) then |
| 94 |
C ... Fill the side list |
| 95 |
call iniint(numel, 2, ia(klst)) |
| 96 |
end if |
| 97 |
do 200 i=1, nbck |
| 98 |
call expsp (ndbout, idbck(i), numel, nssur, ierr) |
| 99 |
call expss (ndbout, idbck(i), issbck, ia(klst), ierr) |
| 100 |
call expssd (ndbout, idbck(i), a(kdistf), ierr) |
| 101 |
200 continue |
| 102 |
call mddel('LSTSID') |
| 103 |
call mddel('DISTF') |
| 104 |
end if |
| 105 |
|
| 106 |
C ... Write 2D-generated Sidesets |
| 107 |
C ... Fix the side list. Assuming input is quads, then the |
| 108 |
C following should hold newside = oldside + 2 |
| 109 |
do 300 i=1, lesseo |
| 110 |
ltsss3(i) = ltsss3(i) + 2 |
| 111 |
300 continue |
| 112 |
|
| 113 |
do 310 i=1, numess |
| 114 |
call expsp (ndbout, idess(i), nees3(i), nnes3(i), ierr) |
| 115 |
call expss (ndbout, idess(i), ltees3(ixees3(i)), |
| 116 |
& ltsss3(ixees3(i)), ierr) |
| 117 |
call expssd (ndbout, idess(i), faces3(ixnes3(i)), ierr) |
| 118 |
310 continue |
| 119 |
|
| 120 |
RETURN |
| 121 |
|
| 122 |
400 CONTINUE |
| 123 |
RETURN 1 |
| 124 |
END |