Debian Codegraph @

packages/seacas/applications/blot/dbsbel.f

raw
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 DBSBEL (NELBLK, NUMEL, LENE, INEL, NLISEL, LISEL)
9 C=======================================================================
10
11 C --*** DBSBEL *** (BLOT) Select elements given list of elements
12 C -- Written by Amy Gilkey - revised 01/05/88
13 C --
14 C --DBSBEL creates the element block selection array and the element
15 C --selection array (by block) given a list of selected elements.
16 C --
17 C --Parameters:
18 C -- NELBLK - IN - the number of element blocks
19 C -- NUMEL - IN - the number of elements
20 C -- LENE - IN - the cumulative element counts by element block
21 C -- INEL - IN - the indices of the selected elements
22 C -- NLISEL - IN/OUT - the number of selected elements for each block
23 C -- LISEL - IN/OUT - the indices of the selected elements (by block)
24
25 INTEGER LENE(0:*)
26 INTEGER INEL(0:*)
27 INTEGER NLISEL(0:*)
28 INTEGER LISEL(0:*)
29
30 LISEL(0) = 0
31 CALL INIINT (NUMEL, 0, LISEL(1))
32
33 NLISEL(0) = 0
34 DO 110 IELB = 1, NELBLK
35 IEL = LENE(IELB-1)+1
36 LEL = LENE(IELB)
37 NEL = 0
38 DO 100 I = 1, INEL(0)
39 IF ((INEL(I) .GE. IEL) .AND. (INEL(I) .LE. LEL)) THEN
40 LISEL(IEL+NEL) = INEL(I)
41 NEL = NEL + 1
42 END IF
43 100 CONTINUE
44 LISEL(0) = LISEL(0) + NEL
45 NLISEL(IELB) = NEL
46 IF (NEL .GT. 0) NLISEL(0) = NLISEL(0) + 1
47 110 CONTINUE
48
49 RETURN
50 END