OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dxwalc.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/.
23C SPMD_AGETMSR /spe/mach_spmd.F
24!||====================================================================
25!|| dxwalc ../engine/source/output/anim/generate/dxwalc.F
26!||--- called by ------------------------------------------------------
27!|| dxyzsect ../engine/source/output/anim/generate/dxyzsect.F
28!||--- calls -----------------------------------------------------
29!|| spmd_agetmsr ../engine/source/mpi/anim/spmd_agetmsr.F
30!|| write_r_c ../common_source/tools/input_output/write_routtines.c
31!||====================================================================
32 SUBROUTINE dxwalc(X ,RWL ,MSR ,
33 3 XMIN ,YMIN ,ZMIN ,XMAX ,YMAX ,
34 4 ZMAX,FR_WALL)
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39#include "task_c.inc"
40#include "com01_c.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER MSR,FR_WALL(NSPMD+2)
45C REAL
47 . x(3,*), rwl(*),xmin ,ymin ,zmin ,xmax ,ymax , zmax
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER I
52C REAL
54 . xwl, ywl, zwl,xn,yn,zn,d,dx,dy,dz,xl, r, v1, v2, v3, vv1,
55 . vv2, vv3, vv, x0, y0, z0, alpha, s, c
56 REAL R4
57C-----------------------------------------------
58C
59 xn =rwl(1)
60 yn =rwl(2)
61 zn =rwl(3)
62 IF (nspmd == 1) THEN
63 IF(msr==0)THEN
64 xwl=rwl(4)
65 ywl=rwl(5)
66 zwl=rwl(6)
67 ELSE
68 xwl=x(1,msr)
69 ywl=x(2,msr)
70 zwl=x(3,msr)
71 ENDIF
72 ELSE
73 CALL spmd_agetmsr(fr_wall,x,msr,xwl,ywl,zwl,rwl)
74 END IF
75C
76 IF (ispmd==0) THEN
77C
78 dx = xmax - xmin
79 dy = ymax - ymin
80 dz = zmax - zmin
81C
82 r = half*rwl(7)
83 xl = half*max(dx,dy,dz)
84 v1 = zero
85 v2 = zep707
86 v3 = zep707
87 vv1 = v2 * zn - v3 * yn
88 vv2 = v3 * xn - v1 * zn
89 vv3 = v1 * yn - v2 * xn
90 vv = sqrt(vv1*vv1 + vv2*vv2 + vv3*vv3)
91 IF(vv<=half)THEN
92 v1 = zero
93 v2 = -zep707
94 v3 = zep707
95 vv1 = v2 * zn - v3 * yn
96 vv2 = v3 * xn - v1 * zn
97 vv3 = v1 * yn - v2 * xn
98 vv = sqrt(vv1*vv1 + vv2*vv2 + vv3*vv3)
99 ENDIF
100 vv1 = r*vv1/vv
101 vv2 = r*vv2/vv
102 vv3 = r*vv3/vv
103 v1 = vv2 * zn - vv3 * yn
104 v2 = vv3 * xn - vv1 * zn
105 v3 = vv1 * yn - vv2 * xn
106C
107 x0 = xwl
108 y0 = ywl
109 z0 = zwl
110 alpha = zero
111 DO i=1,24
112 s = sin(alpha)
113 c = cos(alpha)
114 r4 = x0 + vv1 * s + v1 * c - xn * xl
115 CALL write_r_c(r4,1)
116 r4 = y0 + vv2 * s + v2 * c - yn * xl
117 CALL write_r_c(r4,1)
118 r4 = z0 + vv3 * s + v3 * c - zn * xl
119 CALL write_r_c(r4,1)
120 r4 = x0 + vv1 * s + v1 * c + xn * xl
121 CALL write_r_c(r4,1)
122 r4 = y0 + vv2 * s + v2 * c + yn * xl
123 CALL write_r_c(r4,1)
124 r4 = z0 + vv3 * s + v3 * c + zn * xl
125 CALL write_r_c(r4,1)
126 alpha = alpha + pi/12
127 ENDDO
128 ENDIF
129C
130 RETURN
131 END
#define my_real
Definition cppsort.cpp:32
subroutine dxwalc(x, rwl, msr, xmin, ymin, zmin, xmax, ymax, zmax, fr_wall)
Definition dxwalc.F:35
#define alpha
Definition eval.h:35
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition law100_upd.F:272
#define max(a, b)
Definition macros.h:21
subroutine spmd_agetmsr(fr_wall, x, msr, xwl, ywl, zwl, rwl)
void write_r_c(float *w, int *len)