Debian Codegraph @

packages/seacas/libraries/suplib/minmxs.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 MINMXS (NPTSEL, IXSEL, PTS, VMIN, VMAX)
9 C=======================================================================
10
11 C --*** MINMXS *** (ETCLIB) Calculate min/max value of selected points
12 C -- Written by Amy Gilkey - revised 11/10/87
13 C --
14 C --MINMXS calculates the minimum and maximum of the selected data points.
15 C --
16 C --Parameters:
17 C -- NPTSEL - IN - the number of selected points
18 C -- IXSEL - IN - the node numbers of the selected nodes
19 C -- PTS - IN - the points
20 C -- VMIN, VMAX - OUT - the maximum and maximum value of the points
21
22 INTEGER NPTSEL
23 INTEGER IXSEL(*)
24 REAL PTS(*)
25 REAL VMIN, VMAX
26
27 VMIN = 1.0E+30
28 VMAX = -1.0E+30
29 DO 10 IX = 1, NPTSEL
30 I = IXSEL(IX)
31 VMIN = MIN (VMIN, PTS(I))
32 VMAX = MAX (VMAX, PTS(I))
33 10 CONTINUE
34
35 RETURN
36 END