| 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 SPSEGM (NNE, ISEGEL, ISTART, IEND) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** SPSEGM *** (SPLOT) Find a segment of defined values |
| 12 |
C -- Written by Amy Gilkey - revised 11/05/87 |
| 13 |
C -- |
| 14 |
C --SPSEGM finds the starting and ending indices of a segment of |
| 15 |
C --defined values. The segment is defined as having consecutive indices. |
| 16 |
C -- |
| 17 |
C --Parameters: |
| 18 |
C -- NNE - IN - the number of defined elements |
| 19 |
C -- ISEGEL - IN - the indices of the defined elements |
| 20 |
C -- ISTART - OUT - the starting index of the next segment |
| 21 |
C -- IEND - IN/OUT - the ending index of the last segment on input; |
| 22 |
C -- the ending index of the next segment on output |
| 23 |
|
| 24 |
INTEGER ISEGEL(*) |
| 25 |
|
| 26 |
ISTART = IEND + 1 |
| 27 |
|
| 28 |
DO 100 IEND = ISTART+1, NNE |
| 29 |
IF (ISEGEL(IEND-1)+1 .NE. ISEGEL(IEND)) GOTO 110 |
| 30 |
100 CONTINUE |
| 31 |
110 CONTINUE |
| 32 |
IEND = IEND - 1 |
| 33 |
|
| 34 |
RETURN |
| 35 |
END |