Debian Codegraph @

packages/seacas/applications/gen3d/g3_trnxyz.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 TRNXYZ (XN, YN, XN3, YN3, ZN3, IXNP, NRNP, ZCORD)
9 C=======================================================================
10
11 C --*** NEWXYZ *** (GEN3D) Calculate 3D coordinates
12 C -- Written by Amy Gilkey - revised 05/09/88
13 C -- Modified by Greg Sjaardema - 02/06/89
14 C -- Added Warp Function
15 C -- Added Gradient to Rotations (not for center blocks)
16 C --
17 C --NEWXYZ calculates the coordinate array for the 3D database.
18 C --
19 C --Parameters:
20 C -- XN, YN - IN - the 2D coordinates, destroyed
21 C -- XN3, YN3, ZN3 - OUT - the 3D coordinates
22 C -- IXNP - IN - the new index for each node
23 C -- NRNP - IN - the number of new nodes generated for each node
24 C -- NPCEN - IN - the node numbers of the center nodes by column and row
25 C -- ZCORD - SCRATCH - size = NNREPL, holds z coordinate for transformations
26 C --
27 C --Common Variables:
28 C -- Uses NDIM, NUMNP of /DBNUMS/
29 C -- Uses NDIM3, NUMNP3 of /DBNUM3/
30 C -- Uses DOTRAN, NNREPL, DIM3, NRTRAN, D3TRAN, ZGRAD,
31 C -- CENTER, NUMCOL, NUMROW of /PARAMS/
32 C -- Uses XOFFS, YOFFS, ZOFFS of /XYZOFF/
33 C -- Uses ROT3D, ROTMAT of /XYZROT/
34
35 INCLUDE 'g3_dbnums.blk'
36 INCLUDE 'g3_dbnum3.blk'
37 INCLUDE 'g3_params.blk'
38
39 REAL XN(NUMNP), YN(NUMNP),
40 & XN3(NUMNP3), YN3(NUMNP3), ZN3(NUMNP3)
41 INTEGER IXNP(*), NRNP(*)
42 REAL ZCORD(NNREPL)
43
44 C --Copy Y coordinate from original
45
46 DO 520 INP = 1, NUMNP
47 JNP0 = IXNP(INP) - 1
48 DO 510 NR = 1, NRNP(INP)
49 YN3(JNP0+NR) = YN(INP)
50 510 CONTINUE
51 520 CONTINUE
52
53 C --For translations, repeat the X coordinate and add a Z coordinate
54
55 IBLK = 0
56 NXTNR = 1
57
58 ZEND = 0.0
59 1 CONTINUE
60 IBLK = IBLK + 1
61 IF (NRTRAN(IBLK) .GT. 0) THEN
62 ZBEG = ZEND
63 ZEND = ZBEG + D3TRAN(IBLK)
64 CALL INIGRD (-ZBEG, -ZEND, ZGRAD(IBLK),
65 * NRTRAN(IBLK), NRTRAN(IBLK)+1, ZCORD(NXTNR) )
66 NXTNR = NXTNR + NRTRAN(IBLK)
67 IF (IBLK .LT. MAXINT) GO TO 1
68 END IF
69
70 C --Repeat the X coordinate and add the calculated Z coordinate
71
72 DO 30 INP = 1, NUMNP
73 JNP = IXNP(INP) - 1
74 DO 20 NR = 1, NNREPL
75 XN3(JNP+NR) = XN(INP)
76 ZN3(JNP+NR) = ZCORD(NR)
77 20 CONTINUE
78 30 CONTINUE
79 RETURN
80 END