Debian Codegraph @

packages/seacas/applications/blot/cntelb.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 CNTELB (IELBST, NELBLK, NUMON, NUMSEL)
9 C=======================================================================
10
11 C --*** CNTELB *** (MESH) Counts selected element blocks
12 C -- Written by Amy Gilkey - revised 01/23/87
13 C --
14 C --CNTELB counts the number of ON element blocks and the number of selected
15 C --element blocks.
16 C --
17 C --Parameters:
18 C -- IELBST - IN - the element block status:
19 C -- -1 = OFF, 0 = ON, but not selected, 1 = selected
20 C -- NELBLK - IN - the number of element blocks
21 C -- NUMON - OUT - the number of ON element blocks
22 C -- NUMSEL - OUT - the number of selected element blocks
23
24 INTEGER IELBST(NELBLK)
25
26 C --Count the number of ON element blocks
27
28 NUMON = 0
29 DO 100 IELB = 1, NELBLK
30 IF (IELBST(IELB) .GE. 0) NUMON = NUMON + 1
31 100 CONTINUE
32
33 C --Count the number of selected element blocks
34
35 NUMSEL = 0
36 DO 110 IELB = 1, NELBLK
37 IF (IELBST(IELB) .GT. 0) NUMSEL = NUMSEL + 1
38 110 CONTINUE
39
40 RETURN
41 END