Debian Codegraph @

packages/seacas/applications/blot/deflim.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 DEFLIM (A, WHOTIM, XN, YN, ZN, NPSURF)
9 C=======================================================================
10
11 C --*** DEFLIM *** (MESH) Calculate deformed mesh limits
12 C -- Written by Amy Gilkey - revised 01/22/88
13 C -- D. P. Flanagan, 11/17/82
14 C --
15 C --DEFLIM calculates the limits of the deformed mesh.
16 C --
17 C --Parameters:
18 C -- A - IN - the dynamic memory base array
19 C -- WHOTIM - IN - true iff whole (versus history) time step
20 C -- XN,YN,ZN - IN - the nodal coordinates (ZN for 3D only)
21 C -- NPSURF - IN - the node numbers of the surface nodes
22 C -- or mesh boundary nodes (2D)
23 C --
24 C --Common Variables:
25 C -- Uses NDIM, NVARNP, NSTEPS of /DBNUMS/
26 C -- Uses IS3DIM, NNPSUR, NUMNPF of /D3NUMS/
27 C -- Sets DEFOK, DEFFAC, IXDEF, IYDEF, IZDEF of /DEFORM/
28 C -- Sets ALMESH of /MSHLIM/
29
30 PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6)
31
32 include 'debug.blk'
33 include 'dbnums.blk'
34 include 'd3nums.blk'
35 include 'deform.blk'
36 include 'mshlim.blk'
37
38 DIMENSION A(*)
39 LOGICAL WHOTIM(*)
40 REAL XN(*), YN(*), ZN(*)
41 INTEGER NPSURF(*)
42
43 C --Calculate the default magnification
44
45 CALL CALMAG (DEFOK, IS3DIM, DEFFAC)
46 CALL MDSTAT (NERR, MEM)
47 IF (NERR .GT. 0) GOTO 110
48
49 C --Find deformed mesh limits
50
51 C --Note that the displacement variables will be put on the random file
52 C --which will improve efficiency
53
54 CALL CPYREA (2*NDIM, UNMESH, ALMESH)
55
56 IF (DEFOK) THEN
57 CALL MDRSRV ('DLX', KDXN, NUMNPF)
58 CALL MDRSRV ('DLY', KDYN, NUMNPF)
59 IF (IS3DIM) THEN
60 CALL MDRSRV ('DLZ', KDZN, NUMNPF)
61 ELSE
62 KDZN = 1
63 END IF
64 CALL MDSTAT (NERR, MEM)
65 IF (NERR .GT. 0) GOTO 110
66
67 DO 100 ISTEP = 1, NSTEPS
68 IF (WHOTIM(ISTEP)) THEN
69 CALL DEFXYZ (A, ISTEP, DEFFAC, .TRUE., NPSURF,
70 & XN, YN, ZN, A(KDXN), A(KDYN), A(KDZN))
71 CALL MINMXS (NNPSUR, NPSURF, A(KDXN), XMIN, XMAX)
72 ALMESH(KLFT) = MIN (ALMESH(KLFT), XMIN)
73 ALMESH(KRGT) = MAX (ALMESH(KRGT), XMAX)
74 CALL MINMXS (NNPSUR, NPSURF, A(KDYN), XMIN, XMAX)
75 ALMESH(KBOT) = MIN (ALMESH(KBOT), XMIN)
76 ALMESH(KTOP) = MAX (ALMESH(KTOP), XMAX)
77 IF (IS3DIM) THEN
78 CALL MINMXS (NNPSUR, NPSURF, A(KDZN), XMIN, XMAX)
79 ALMESH(KNEA) = MIN (ALMESH(KNEA), XMIN)
80 ALMESH(KFAR) = MAX (ALMESH(KFAR), XMAX)
81 END IF
82 END IF
83 100 CONTINUE
84
85 CALL MDDEL ('DLX')
86 CALL MDDEL ('DLY')
87 IF (IS3DIM) THEN
88 CALL MDDEL ('DLZ')
89 END IF
90 END IF
91
92 110 CONTINUE
93 RETURN
94 END