Debian Codegraph @

packages/seacas/applications/blot/msscal.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 MSSCAL (DOSCAL, NNPSEL, NPSEL, XN, YN, ZN)
9 C=======================================================================
10
11 C --*** MSSCAL *** (MESH) Set the mesh scale
12 C -- Written by Amy Gilkey - revised 08/31/87
13 C --
14 C --MSSCAL sets the mesh window from the selected nodes, if requested,
15 C --and calls SETUP to calculate the mesh scaling variables.
16 C --
17 C --Parameters:
18 C -- DOSCAL - IN - true iff the mesh window limits are to be calculated
19 C -- NNPSEL - IN - the number of nodes in the mesh window
20 C -- NPSEL - IN - the nodes in the mesh window
21 C -- XN, YN, ZN - IN - the nodal coordinates (ZN for 3D only)
22 C --
23 C --Common Variables:
24 C -- Uses MSHDEF of /MSHOPT/
25 C -- Uses XISSYM, YISSYM, LFTSYM, BOTSYM of /VIEWS/
26 C -- Sets and uses ZMMESH of /MSHLIM/
27 C -- Uses SQMESH, RDMESH of /MSHLIM/
28
29 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6)
30
31 include 'mshopt.blk'
32 include 'views.blk'
33 include 'mshlim.blk'
34
35 LOGICAL DOSCAL, INHBF
36 SAVE INHBF
37 INTEGER NPSEL(*)
38 REAL XN(*), YN(*), ZN(*)
39 DATA INHBF /.TRUE./
40
41 C --Calculate the axis limits
42
43 INHBF = (INHBF .AND.
44 * RDMESH(KLFT) .EQ. 0.0 .and. RDMESH(KRGT) .EQ. 0.0 .AND.
45 * RDMESH(KBOT) .EQ. 0.0 .and. RDMESH(KTOP) .EQ. 0.0)
46 IF (DOSCAL .OR. INHBF) THEN
47 INHBF = .FALSE.
48
49 C --Calculate the axis limits
50
51 CALL MINMXS (NNPSEL, NPSEL, XN, RDMESH(KLFT), RDMESH(KRGT))
52 CALL MINMXS (NNPSEL, NPSEL, YN, RDMESH(KBOT), RDMESH(KTOP))
53
54 C --Expand limits a little
55
56 CALL EXPLIM (2, RDMESH, RDMESH)
57 CALL ADJLIM (MSHDEF,
58 & XISSYM, YISSYM, LFTSYM, BOTSYM, XAXSYM, YAXSYM,
59 & SQMESH, RDMESH, ZMMESH)
60 END IF
61
62 C --Set up graphics
63
64 CALL SETUP (MSHDEF, ZMMESH)
65
66 RETURN
67 END