| 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 WRNPS (NTXT, NUMNPS, LNPSNL, LNPSDF, IDNPS, NNNPS, |
| 9 |
& NDNPS, IXNNPS, IXDNPS, LTNNPS, FACNPS) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** WRNPS *** (EXOTXT) Write database nodal point sets |
| 13 |
C -- Written by Amy Gilkey - revised 02/27/86 |
| 14 |
C -- Modified for ExodusIIv2 database format 10/12/95 |
| 15 |
C -- |
| 16 |
C --WRNPS writes the nodal point set information from the database. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- LNPSNL - IN - the length of the nodal point sets node list |
| 20 |
C -- IDNPS - IN - the nodal point set ID for each set |
| 21 |
C -- NNNPS - IN - the number of nodes for each set |
| 22 |
C -- IXNNPS - IN - the index of the first node for each set |
| 23 |
C -- LSTNPS - IN - the nodes for all sets |
| 24 |
C -- FACNPS - IN - the distribution factors for all sets |
| 25 |
|
| 26 |
C -- NTXT - IN - the text file |
| 27 |
C -- NUMNPS - IN - the number of nodal point sets |
| 28 |
C -- LNPSNL - IN - length of node set node list |
| 29 |
C -- LNPSDF - IN - length of node set distribution factor list |
| 30 |
C -- IDNPS - IN - array containing the node set ID's for each node set |
| 31 |
C -- NNNPS - IN - array containing the number of nodes for each node set |
| 32 |
C -- NDNPS - IN - array containing number of dist. fact for each node set |
| 33 |
C -- IXNNPS - IN - array containing indices into the LTNNPS array which |
| 34 |
C are the location of the 1st nodes for each set |
| 35 |
C -- IXDNPS - IN - array containing indices into the FACNPS array which |
| 36 |
C are the location of the 1st dist factor for each set |
| 37 |
C -- LTNNPS - IN - array containing the nodes for all node sets |
| 38 |
C Internal node IDs |
| 39 |
C -- FACNPS - IN - array containing the distribution factors |
| 40 |
C for all node sets |
| 41 |
|
| 42 |
IMPLICIT NONE |
| 43 |
INTEGER NTXT, NUMNPS, LNPSNL, LNPSDF, IDS, OFF |
| 44 |
INTEGER INS, INE, INPS, NL |
| 45 |
INTEGER IDNPS(*) |
| 46 |
INTEGER NNNPS(*) |
| 47 |
INTEGER NDNPS(*) |
| 48 |
INTEGER IXNNPS(*) |
| 49 |
INTEGER IXDNPS(*) |
| 50 |
INTEGER LTNNPS(*) |
| 51 |
REAL FACNPS(*) |
| 52 |
|
| 53 |
WRITE (NTXT, 10005) '! Node sets ', NUMNPS |
| 54 |
WRITE (NTXT, 10005) '! Len node set node list ', LNPSNL |
| 55 |
WRITE (NTXT, 10005) '! Len node set dist fact list', LNPSDF |
| 56 |
DO 100 INPS = 1, NUMNPS |
| 57 |
WRITE (NTXT, '(A, I10)') '! Nodal point set', INPS |
| 58 |
WRITE (NTXT, 10000) IDNPS(INPS), NNNPS(INPS), NDNPS(INPS), |
| 59 |
& '! ID, nodes, dist factors' |
| 60 |
|
| 61 |
INS = IXNNPS(INPS) |
| 62 |
INE = IXNNPS(INPS) + NNNPS(INPS) - 1 |
| 63 |
|
| 64 |
if (ndnps(inps) .ne. 0) then |
| 65 |
IDS = IXDNPS(INPS) |
| 66 |
OFF = IDS - INS |
| 67 |
if (NNNPS(INPS) .NE. NDNPS(INPS)) then |
| 68 |
call prterr('FATAL', |
| 69 |
$ 'Number of df in nodeset does not match node count') |
| 70 |
end if |
| 71 |
if (ins .le. ine) |
| 72 |
& WRITE (NTXT, 10020) |
| 73 |
$ (LTNNPS(NL), FACNPS(NL+OFF), NL=INS,INE) |
| 74 |
else |
| 75 |
if (ins .le. ine) |
| 76 |
& WRITE (NTXT, 10010) (LTNNPS(NL), NL=INS,INE) |
| 77 |
endif |
| 78 |
|
| 79 |
100 CONTINUE |
| 80 |
|
| 81 |
RETURN |
| 82 |
10000 FORMAT (3I10, 6X, A) |
| 83 |
10005 FORMAT (A, I10) |
| 84 |
10010 FORMAT (I10) |
| 85 |
10020 FORMAT (I10, 2X, 1pE16.7) |
| 86 |
END |