Debian Codegraph @

packages/seacas/applications/blot/sqrlim.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 SQRLIM (RDMESH, SQMESH)
9 C=======================================================================
10
11 C --*** SQRLIM *** (MESH) Expand 2D mesh limits to square
12 C -- Written by Amy Gilkey - revised 05/23/86
13 C --
14 C --SQRLIM expands the mesh limits to form a square.
15 C --
16 C --Parameters:
17 C -- RDMESH - IN - the mesh limits
18 C -- (left, right, bottom, top)
19 C -- SQMESH - OUT - the square mesh limits (may be RDMESH)
20 C -- (left, right, bottom, top)
21
22 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6)
23
24 REAL RDMESH(KTOP), SQMESH(KTOP)
25
26 RNG2 = .5 * MAX (RDMESH(KRGT) - RDMESH(KLFT)
27 & , RDMESH(KTOP) - RDMESH(KBOT))
28 XCEN = .5 * (RDMESH(KRGT) + RDMESH(KLFT))
29 YCEN = .5 * (RDMESH(KTOP) + RDMESH(KBOT))
30 SQMESH(KLFT) = XCEN - RNG2
31 SQMESH(KRGT) = XCEN + RNG2
32 SQMESH(KBOT) = YCEN - RNG2
33 SQMESH(KTOP) = YCEN + RNG2
34
35 RETURN
36 END