Debian Codegraph @

packages/seacas/applications/blot/nummod.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 INTEGER FUNCTION NUMMOD (MODE, MODSUB, MATMOD, MATSUB)
9 C=======================================================================
10
11 C --*** NUMMOD *** (MESH) Count the number of matching modes
12 C -- Written by Amy Gilkey - revised 10/05/87
13 C --
14 C --NUMMOD returns the number of defined modes that match both mode
15 C --and sub-mode (if given).
16 C --
17 C --Parameters:
18 C -- MODE - the modes
19 C -- MODSUB - the sub-modes
20 C -- MATMOD - IN - the mode to match
21 C -- MATSUB - IN - the sub-mode to match (if not ' ')
22
23 CHARACTER*(*) MODE(4), MODSUB(4), MATMOD, MATSUB
24
25 NUMMOD = 0
26
27 IF (MATSUB .EQ. ' ') THEN
28 DO 100 IVIEW = 1, 4
29 IF (MODE(IVIEW) .EQ. MATMOD) NUMMOD = NUMMOD + 1
30 100 CONTINUE
31 ELSE
32 DO 110 IVIEW = 1, 4
33 IF ((MODE(IVIEW) .EQ. MATMOD)
34 & .AND. (MODSUB(IVIEW) .EQ. MATSUB))
35 & NUMMOD = NUMMOD + 1
36 110 CONTINUE
37 END IF
38
39 RETURN
40 END