OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dnwalc.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| dnwalc ../engine/source/output/anim/generate/dnwalc.F
25!||--- called by ------------------------------------------------------
26!|| dsecnor ../engine/source/output/anim/generate/dsecnor.F
27!||--- calls -----------------------------------------------------
28!|| write_s_c ../common_source/tools/input_output/write_routtines.c
29!||====================================================================
30 SUBROUTINE dnwalc(X ,RWL ,MSR )
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C D u m m y A r g u m e n t s
37C-----------------------------------------------
38 INTEGER MSR
40 . x(3,*), rwl(*)
41C-----------------------------------------------
42C L o c a l V a r i a b l e s
43C-----------------------------------------------
44 INTEGER I,J
46 . xwl, ywl, zwl,xn,yn,zn,d,dx,dy,dz,xl, v1, v2, v3, vv1,
47 . vv2, vv3, vv,s,c,xx,yy,zz,alpha,x0,y0,z0
48 REAL R4
49C-----------------------------------------------
50C
51 xn =rwl(1)
52 yn =rwl(2)
53 zn =rwl(3)
54 IF(msr==0)THEN
55 xwl=rwl(4)
56 ywl=rwl(5)
57 zwl=rwl(6)
58 ELSE
59 xwl=x(1,msr)
60 ywl=x(2,msr)
61 zwl=x(3,msr)
62 ENDIF
63C
64 v1 = zero
65 v2 = zep707
66 v3 = zep707
67
68 vv1 = v2 * zn - v3 * yn
69 vv2 = v3 * xn - v1 * zn
70 vv3 = v1 * yn - v2 * xn
71 vv = sqrt(vv1*vv1 + vv2*vv2 + vv3*vv3)
72 IF(vv<=half)THEN
73 v1 = zero
74 v2 = -zep707
75 v3 = zep707
76 vv1 = v2 * zn - v3 * yn
77 vv2 = v3 * xn - v1 * zn
78 vv3 = v1 * yn - v2 * xn
79 vv = sqrt(vv1*vv1 + vv2*vv2 + vv3*vv3)
80 ENDIF
81 vv1 = vv1/vv
82 vv2 = vv2/vv
83 vv3 = vv3/vv
84 v1 = vv2 * zn - vv3 * yn
85 v2 = vv3 * xn - vv1 * zn
86 v3 = vv1 * yn - vv2 * xn
87C
88 alpha = zero
89 DO i=1,24
90 s = sin(alpha)
91 c = cos(alpha)
92 xx = vv1 * s + v1 * c
93 yy = vv2 * s + v2 * c
94 zz = vv3 * s + v3 * c
95 d = three1000
96 DO j=1,2
97 CALL write_s_c(nint(xx*d),1)
98 CALL write_s_c(nint(yy*d),1)
99 CALL write_s_c(nint(zz*d),1)
100 ENDDO
101 alpha = alpha + pi*one_over_12
102 ENDDO
103C
104 RETURN
105 END
#define my_real
Definition cppsort.cpp:32
subroutine dnwalc(x, rwl, msr)
Definition dnwalc.F:31
#define alpha
Definition eval.h:35
void write_s_c(int *w, int *len)