Debian Codegraph @

packages/seacas/applications/blot/interp.f

raw
1 C Copyright(C) 1999-2020, 2024 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 LOGICAL FUNCTION INTERP_BL (CNTR, F1, F2, PSI)
9 C=======================================================================
10
11 C --*** INTERP_BL *** (DETOUR) Compute interception point
12 C -- Written by Amy Gilkey - revised 11/21/85
13 C -- D. P. Flanagan, 3/25/83
14 C --
15 C --INTERP_BL tests if a contour value falls within an interval.
16 C --A degenerate interval fails regardless of the contour value. If the
17 C --test is passed, the normalized interval coordinate of the contour
18 C --value is computed. The returned function value is true only if the
19 C --interval test is passed.
20 C --
21 C --Parameters:
22 C -- CNTR - IN - the contour value
23 C -- F1 - IN - the interval origin value
24 C -- F2 - IN - the interval terminus value
25 C -- PSI - OUT - normalized interval coordinate
26
27 C --Test if coordinate lies within the interval
28
29 INTERP_BL = (F2 .NE. F1) .AND.
30 & (((F1 .LE. CNTR) .AND. (CNTR .LE. F2))
31 & .OR. ((F2 .LE. CNTR) .AND. (CNTR .LE. F1)))
32
33 C --Compute normalized interval coordinate
34
35 IF (INTERP_BL) PSI = (CNTR - F1) / (F2 - F1)
36 RETURN
37 END