| 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 SELBLK (NUMSEL, IXSEL, NELBLK, LISBLK, NUMELB, NUMLNK, |
| 8 |
* LINK, ISCR, NUMNP, EBTYPE) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
include 'exodusII.inc' |
| 12 |
|
| 13 |
INTEGER IXSEL(*) |
| 14 |
INTEGER LISBLK(0:*) |
| 15 |
INTEGER NUMELB(*) |
| 16 |
INTEGER NUMLNK(*) |
| 17 |
INTEGER LINK(*) |
| 18 |
INTEGER ISCR(*) |
| 19 |
LOGICAL SELECT |
| 20 |
CHARACTER*(MXSTLN) EBTYPE(*) |
| 21 |
CHARACTER*40 STRA |
| 22 |
CHARACTER*132 MSG |
| 23 |
|
| 24 |
do 80 i=1, numnp |
| 25 |
iscr(i) = 0 |
| 26 |
80 continue |
| 27 |
|
| 28 |
islnk = 1 |
| 29 |
do 100 ielb = 1, nelblk |
| 30 |
select = .false. |
| 31 |
do 90 ix = 1, lisblk(0) |
| 32 |
if (ielb .eq. lisblk(ix)) then |
| 33 |
select = .true. |
| 34 |
end if |
| 35 |
90 continue |
| 36 |
if (ebtype(ielb) .eq. 'nsided' .or. |
| 37 |
* ebtype(ielb) .eq. 'NSIDED') THEN |
| 38 |
numnod = numlnk(ielb) |
| 39 |
else |
| 40 |
numnod = numlnk(ielb) * numelb(ielb) |
| 41 |
end if |
| 42 |
if (select) then |
| 43 |
call selblk1(ielb, numnod, link(islnk), iscr) |
| 44 |
end if |
| 45 |
ISLNK = ISLNK + numnod |
| 46 |
100 CONTINUE |
| 47 |
|
| 48 |
numsel = 0 |
| 49 |
do 120 i=1, numnp |
| 50 |
if (iscr(i) .gt. 0) then |
| 51 |
numsel = numsel + 1 |
| 52 |
ixsel(numsel) = i |
| 53 |
end if |
| 54 |
120 continue |
| 55 |
|
| 56 |
write (stra, 10000) numsel |
| 57 |
call pckstr(1, stra) |
| 58 |
MSG = STRA(:lenstr(stra)) // ' nodes selected' |
| 59 |
call prterr('CMDSPEC', MSG) |
| 60 |
10000 format(I12) |
| 61 |
return |
| 62 |
end |
| 63 |
|
| 64 |
subroutine selblk1(ielb, numnod, link, iscr) |
| 65 |
|
| 66 |
integer link(*) |
| 67 |
integer iscr(*) |
| 68 |
|
| 69 |
do i=1, numnod |
| 70 |
node = link(i) |
| 71 |
iscr(node) = iscr(node) + 1 |
| 72 |
end do |
| 73 |
return |
| 74 |
end |