Debian Codegraph @

packages/seacas/applications/blot/defxyz.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 DEFXYZ (A, ISTEP, FACTOR, SURONL, NPSURF,
9 & XN, YN, ZN, DXN, DYN, DZN)
10 C=======================================================================
11
12 C --*** DEFXYZ *** (MESH) Calculate deformed mesh coordinates
13 C -- Written by Amy Gilkey - revised 10/12/87
14 C -- D. P. Flanagan, 11/17/82
15 C --
16 C --DEFXYZ calculates the deformed mesh coordinates for a time step.
17 C --The displacement variables for the time steps are input and the
18 C --deformed mesh coordinates are calculated.
19 C --
20 C --Parameters:
21 C -- A - IN - the dynamic memory base array
22 C -- ISTEP - IN - the time step number
23 C -- FACTOR - IN - the magnification factor
24 C -- SURONL - IN - deform NPSURF nodes only if true (always true for 3D)
25 C -- XN, YN, ZN - IN - the nodal coordinates (ZN for 3D only)
26 C -- NPSURF - IN - the node numbers of the surface nodes
27 C -- or mesh boundary nodes (2D)
28 C -- DXN, DYN, DZN - OUT - the deformed nodal coordinates
29 C -- (DZN for 3D only)
30 C --
31 C --Common Variables:
32 C -- Uses NDIM of /DBNUMS/
33 C -- Uses IS3DIM, NUMNPF of /D3NUMS/
34 C -- Sets IXDEF, IYDEF, IZDEF of /DEFORM/
35
36 include 'dbnums.blk'
37 include 'd3nums.blk'
38 include 'deform.blk'
39
40 DIMENSION A(*)
41 LOGICAL SURONL
42 INTEGER NPSURF(*)
43 REAL XN(NUMNPF), YN(NUMNPF), ZN(NUMNPF)
44 REAL DXN(NUMNPF), DYN(NUMNPF), DZN(NUMNPF)
45
46 CALL GTMVAR (A, IXDEF, -999, ISTEP, NUMNPF, DXN)
47 CALL GTMVAR (A, IYDEF, -999, ISTEP, NUMNPF, DYN)
48 IF (IS3DIM) CALL GTMVAR (A, IZDEF, -999, ISTEP, NUMNPF, DZN)
49
50 IF (.NOT. IS3DIM) THEN
51 IF (SURONL) THEN
52 DO 100 IX = 1, NNPSUR
53 INP = NPSURF(IX)
54 DXN(INP) = XN(INP) + FACTOR * DXN(INP)
55 DYN(INP) = YN(INP) + FACTOR * DYN(INP)
56 100 CONTINUE
57 ELSE
58 DO 110 INP = 1, NUMNPF
59 DXN(INP) = XN(INP) + FACTOR * DXN(INP)
60 DYN(INP) = YN(INP) + FACTOR * DYN(INP)
61 110 CONTINUE
62 END IF
63
64 ELSE
65 DO 120 IX = 1, NNPSUR
66 INP = NPSURF(IX)
67 DXN(INP) = XN(INP) + FACTOR * DXN(INP)
68 DYN(INP) = YN(INP) + FACTOR * DYN(INP)
69 DZN(INP) = ZN(INP) + FACTOR * DZN(INP)
70 120 CONTINUE
71 END IF
72
73 RETURN
74 END