Debian Codegraph @

packages/seacas/applications/explore/exp_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 C=======================================================================
7 SUBROUTINE DBSELB (NELBLK, NUMEL, LENE, INELB, NLISEL, LISEL)
8 C=======================================================================
9
10 C --*** DBSBEL *** (BLOT) Select elements list of element blocks
11 C --
12 C --DBSBEL creates the element block selection array and the element
13 C --selection array (by block) given a list of selected element blocks.
14 C --
15 C --Parameters:
16 C -- NELBLK - IN - the number of element blocks
17 C -- NUMEL - IN - the number of elements
18 C -- LENE - IN - the cumulative element counts by element block
19 C -- INELB - IN - the indices of the selected element blocks
20 C -- NLISEL - IN/OUT - the number of selected elements for each block
21 C -- LISEL - IN/OUT - the indices of the selected elements (by block)
22
23 INTEGER LENE(0:NELBLK)
24 INTEGER INELB(0:*)
25 INTEGER NLISEL(0:NELBLK)
26 INTEGER LISEL(0:*)
27
28 NLISEL(0) = 0
29 CALL INIINT (NELBLK, 0, NLISEL(1))
30 DO 100 IX = 1, INELB(0)
31 IELB = INELB(IX)
32 NLISEL(IELB) = LENE(IELB) - LENE(IELB-1)
33 100 CONTINUE
34 NLISEL(0) = INELB(0)
35
36 LISEL(0) = 0
37 CALL INIINT (NUMEL, 0, LISEL(1))
38
39 DO 120 IELB = 1, NELBLK
40 IF (NLISEL(IELB) .GT. 0) THEN
41 LISEL(0) = LISEL(0) + NLISEL(IELB)
42 DO 110 IEL = LENE(IELB-1)+1, LENE(IELB)
43 LISEL(IEL) = IEL
44 110 CONTINUE
45 END IF
46 120 CONTINUE
47
48 END