Debian Codegraph @

packages/seacas/libraries/suplib/minmxl.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 MINMXL (NPTS, PTOK, PTS, VMIN, VMAX)
9 C=======================================================================
10
11 C --*** MINMXL *** (ETCLIB) Calculate min/max value in selected list
12 C -- Written by Amy Gilkey - revised 11/10/87
13 C --
14 C --MINMXL calculates the minimum and maximum of the data selected by
15 C --a logical value.
16 C --
17 C --Parameters:
18 C -- NPTS - IN - the number of points
19 C -- ISOK - IN - use point i iff ISOK(i)
20 C -- PTS - IN - the points
21 C -- VMIN, VMAX - OUT - the maximum and maximum value of the points
22
23 INTEGER NPTS
24 LOGICAL PTOK(*)
25 REAL PTS(*)
26 REAL VMIN, VMAX
27
28 VMIN = 1.0E+30
29 VMAX = -1.0E+30
30 DO 10 I = 1, NPTS
31 IF (PTOK(I)) THEN
32 VMIN = MIN (VMIN, PTS(I))
33 VMAX = MAX (VMAX, PTS(I))
34 END IF
35 10 CONTINUE
36
37 RETURN
38 END