| 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 |
C======================================================================= |
| 7 |
SUBROUTINE CKEB1 (IEL0, IELB, IDELB, NUMELB, NUMLNK, NUMNP, LINK, |
| 8 |
* NODUSE) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** CKEB1 *** (EXPLORE) Check database element block connectivity |
| 12 |
C -- |
| 13 |
C --CKEB1 checks that the database element block connectivity is within |
| 14 |
C --the nodal range. |
| 15 |
C -- |
| 16 |
C --Parameters: |
| 17 |
C -- IEL0 - IN - the number of the first element in this block - 1 |
| 18 |
C -- IELB - IN - the number of this element block |
| 19 |
C -- IDELB - IN - the element block ID for this block |
| 20 |
C -- NUMELB - IN - the number of elements for this block |
| 21 |
C -- NUMLNK - IN - the number of nodes per element |
| 22 |
C -- NUMNP - IN - the number of nodes |
| 23 |
C -- LINK - IN - the connectivity array for this block |
| 24 |
C -- NODUSE - OUT - scratch array to determine whether all nodes used by an element. |
| 25 |
|
| 26 |
include 'exp_errcnt.blk' |
| 27 |
INTEGER LINK(NUMLNK,*) |
| 28 |
INTEGER NODUSE(*) |
| 29 |
CHARACTER*132 STRA |
| 30 |
|
| 31 |
IF (NUMELB .LE. 0) GOTO 110 |
| 32 |
IF (NUMLNK .LE. 0) GOTO 110 |
| 33 |
|
| 34 |
NERR = 0 |
| 35 |
|
| 36 |
DO 100 NE = 1, NUMELB |
| 37 |
CALL CHKRNG (LINK(1,NE), NUMLNK, NUMNP, NZERO, IERR) |
| 38 |
IF (IERR .GT. 0 .OR. NZERO .GT. 0) THEN |
| 39 |
IF (NERR .EQ. 0) THEN |
| 40 |
WRITE (*, 10000, IOSTAT=IDUM) |
| 41 |
& 'Connectivity Problems', IELB, IDELB |
| 42 |
END IF |
| 43 |
if (nerr .lt. maxerrs .or. maxerrs .le. 0) then |
| 44 |
WRITE (*, 10010, IOSTAT=IDUM) |
| 45 |
& NE, NE+IEL0, (LINK(I,NE), I=1,NUMLNK) |
| 46 |
else if (nerr .eq. maxerrs .and. maxerrs .gt. 0) then |
| 47 |
call prterr('CMDSPEC', |
| 48 |
$ '...skipping additional errors...') |
| 49 |
end if |
| 50 |
NERR = NERR + 1 |
| 51 |
END IF |
| 52 |
|
| 53 |
DO 90 I=1,NUMLNK |
| 54 |
NODE = LINK(I,NE) |
| 55 |
IF (NODE .LE. NUMNP) THEN |
| 56 |
C ... Note that if NODE is out of range, the error message above will have |
| 57 |
C already been printed, so we don't print anything here. |
| 58 |
NODUSE(NODE) = 1 |
| 59 |
END IF |
| 60 |
90 CONTINUE |
| 61 |
|
| 62 |
100 CONTINUE |
| 63 |
if (nerr .gt. 0) then |
| 64 |
write (stra, 10020) nerr, idelb |
| 65 |
call sqzstr(stra, lstra) |
| 66 |
CALL PRTERR ('CMDSPEC', STRA(:lstra)) |
| 67 |
end if |
| 68 |
|
| 69 |
110 CONTINUE |
| 70 |
RETURN |
| 71 |
|
| 72 |
10000 FORMAT (/, 1X, ' # elem ', A, ' for block #', I12, |
| 73 |
& ',', I12, ' = ID') |
| 74 |
10010 FORMAT (1X, I12, I12, 5X, 6I12, :, /, |
| 75 |
& (26X, 6I12)) |
| 76 |
10020 FORMAT('ELEMENT CONNECTIVITY ERROR: Found ',I12, |
| 77 |
$ ' errors in element connectivity check for element block ' |
| 78 |
$ , i10) |
| 79 |
END |