Debian Codegraph @

packages/seacas/applications/blot/dbselb.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 DBSELB (NELBLK, NUMEL, LENE, INELB, NLISEL, LISEL)
9 C=======================================================================
10
11 C --*** DBSBEL *** (BLOT) Select elements list of element blocks
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 element blocks.
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 -- INELB - IN - the indices of the selected element blocks
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 INELB(0:*)
27 INTEGER NLISEL(0:*)
28 INTEGER LISEL(0:*)
29
30 NLISEL(0) = 0
31 CALL INIINT (NELBLK, 0, NLISEL(1))
32 DO 100 IX = 1, INELB(0)
33 IELB = INELB(IX)
34 NLISEL(IELB) = LENE(IELB) - LENE(IELB-1)
35 100 CONTINUE
36 NLISEL(0) = INELB(0)
37
38 LISEL(0) = 0
39 CALL INIINT (NUMEL, 0, LISEL(1))
40
41 DO 120 IELB = 1, NELBLK
42 IF (NLISEL(IELB) .GT. 0) THEN
43 LISEL(0) = LISEL(0) + NLISEL(IELB)
44 DO 110 IEL = LENE(IELB-1)+1, LENE(IELB)
45 LISEL(IEL) = IEL
46 110 CONTINUE
47 END IF
48 120 CONTINUE
49
50 RETURN
51 END