Debian Codegraph @

packages/seacas/applications/grepos/gp_wrpxyz.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 WRPXYZ (X, Y, Z, NUMNP, IWARP, NORMAL, REFDIS)
9 C=======================================================================
10 REAL X(NUMNP), Y(NUMNP), Z(NUMNP)
11
12 C ... Origin
13 if (iwarp .eq. 1) then
14 call PRTERR('PROGRAM', 'Origin warping not implemented yet.')
15 C ... Xaxis
16 else if (iwarp .eq. -1) then
17 if (normal .eq. 2) then
18 call warpit(x, y, z, numnp, refdis)
19 else if (normal .eq. 3) then
20 call warpit(x, z, y, numnp, refdis)
21 end if
22
23 C ... Yaxis
24 else if (iwarp .eq. -2) then
25 if (normal .eq. 3) then
26 call warpit(y, z, x, numnp, refdis)
27 else if (normal .eq. 1) then
28 call warpit(y, x, z, numnp, refdis)
29 end if
30
31 C ... Zaxis
32 else if (iwarp .eq. -3) then
33 if (normal .eq. 1) then
34 call warpit(z, x, y, numnp, refdis)
35 else if (normal .eq. 2) then
36 call warpit(z, y, x, numnp, refdis)
37 end if
38 end if
39
40 RETURN
41 END
42
43 SUBROUTINE WARPIT(C1, C2, C3, NUMNP, REFDIS)
44 REAL C1(NUMNP), C2(NUMNP), C3(NUMNP)
45
46 do 10 i=1, numnp
47 c1(i) = c1(i)
48
49 radius = c2(i)
50 theta = c3(i) / refdis
51
52 c3(i) = radius * sin(theta)
53 c2(i) = radius * cos(theta)
54 10 continue
55
56 return
57 end