| 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 RWMAP (NDBIN, NDBOUT, NUMEL, NUMELO, IXELEM, |
| 9 |
& MAPEL, NEWIX) |
| 10 |
C======================================================================= |
| 11 |
C --*** RWMAP *** (ALGEBRA) Read and write database element order map |
| 12 |
C -- Written by Amy Gilkey - revised 04/28/88 |
| 13 |
C -- Modified for EXODUSIIV2 format 8/29/95 |
| 14 |
C -- |
| 15 |
C --RWMAP reads and writes the element order map to the database. |
| 16 |
C --Deleted elements are removed. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- NDBIN, NDBOUT - IN - the input and output database file |
| 20 |
C -- NUMEL - IN - the number of elements |
| 21 |
C -- NUMELO - IN - the number of output elements |
| 22 |
C -- IXELEM - IN - the indices of the output elements (iff NUMELO <> NUMEL) |
| 23 |
C -- IOERR - OUT - input/output error flag |
| 24 |
C -- MAPEL - SCRATCH - the element order map |
| 25 |
C -- NEWIX - SCRATCH - size = NUMEL (iff NUMELO <> NUMEL) |
| 26 |
C -- |
| 27 |
C --Database must be positioned at start of map upon entry; |
| 28 |
C --upon exit at end of map. |
| 29 |
|
| 30 |
INTEGER IXELEM(*) |
| 31 |
INTEGER MAPEL(*) |
| 32 |
INTEGER NEWIX(*) |
| 33 |
|
| 34 |
call exgmap (ndbin, mapel, ierr) |
| 35 |
|
| 36 |
IF ((NUMELO .GT. 0) .AND. (NUMEL .NE. NUMELO)) THEN |
| 37 |
do ix = 1, numelo |
| 38 |
newix(ix) = mapel(ixelem(ix)) |
| 39 |
end do |
| 40 |
do ix = 1, numelo |
| 41 |
mapel(ix) = newix(ix) |
| 42 |
end do |
| 43 |
END IF |
| 44 |
|
| 45 |
call expmap(ndbout, mapel, ierr) |
| 46 |
|
| 47 |
call exgenm(ndbin, mapel, ierr) |
| 48 |
|
| 49 |
IF ((NUMELO .GT. 0) .AND. (NUMEL .NE. NUMELO)) THEN |
| 50 |
do ix = 1, numelo |
| 51 |
newix(ix) = mapel(ixelem(ix)) |
| 52 |
end do |
| 53 |
do ix = 1, numelo |
| 54 |
mapel(ix) = newix(ix) |
| 55 |
end do |
| 56 |
END IF |
| 57 |
|
| 58 |
call expenm(ndbout, mapel, ierr) |
| 59 |
|
| 60 |
RETURN |
| 61 |
END |