OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
dxyzsrg.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!|| dxyzsrg ../starter/source/output/anim/dxyzsrg.F
25!||--- called by ------------------------------------------------------
26!|| genani1 ../starter/source/output/anim/genani1.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!||====================================================================
30 SUBROUTINE dxyzsrg (NESRG,IGRSURF,BUFSF)
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE groupdef_mod
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "com04_c.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER NESRG
48 . bufsf(*)
49 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF
50C-----------------------------------------------
51C L o c a l V a r i a b l e s
52C-----------------------------------------------
53 INTEGER N, ADRBUF
54 INTEGER INOE, I, J, K, IDG, ITER
55 my_real xg,yg,zg,a,b,c,rot(9),
56 1 dgr,an,bn,cn,
57 2 xln,yln,zln,nxl,nyl,nzl,normn
59 1 ncor(3,384),
60 2 xa,xb,xc,la,lb,lc,
61 3 xx,yy,zz,xl,yl,zl,e,d
63 1 xx0,yy0,zz0,
64 2 x0(6),y0(6),z0(6),dx0(6),dy0(6),dz0(6),dx1(6),dy1(6),dz1(6)
65 REAL R4
66 DATA dx0/ 0., 0., 0., 0., 0., 0./
67 DATA dy0/ 1.,-1., 0., 0., 0., 0./
68 DATA dz0/ 0., 0.,-1., 1., 1.,-1./
69 DATA dx1/ 1., 1., 1., 1., 0., 0./
70 DATA dy1/ 0., 0., 0., 0., 1., 1./
71 DATA dz1/ 0., 0., 0., 0., 0., 0./
72 DATA x0 /-3.5,-3.5,-3.5,-3.5,-3.5, 3.5/
73 DATA y0 /-3.5, 3.5,-3.5, 3.5,-3.5,-3.5/
74 DATA z0 /-3.5, 3.5, 3.5,-3.5,-3.5, 3.5/
75C-----------------------------------------------
76 DO 200 n=1,nsurf
77 IF (igrsurf(n)%TYPE/=101) GOTO 200
78 adrbuf=igrsurf(n)%IAD_BUFR
79C-------------------------------------------------------
80c Parametres de l'ellipsoide.
81C-------------------------------------------------------
82 dgr=bufsf(adrbuf+36)
83 idg=dgr
84 xg=bufsf(adrbuf+4)
85 yg=bufsf(adrbuf+5)
86 zg=bufsf(adrbuf+6)
87 a =bufsf(adrbuf+1)
88 b =bufsf(adrbuf+2)
89 c =bufsf(adrbuf+3)
90 DO i=1,9
91 rot(i)=bufsf(adrbuf+7+i-1)
92 END DO
93C-------------------------------------------------------
94C - Calcul des noeuds sur le cube A,B,C
95C-------------------------------------------------------
96 inoe=0
97 DO i = 1,6
98 xx0 = x0(i)
99 yy0 = y0(i)
100 zz0 = z0(i)
101 DO j = 1,8
102 xl = xx0
103 yl = yy0
104 zl = zz0
105 DO k = 1,8
106 inoe=inoe+1
107 ncor(1,inoe) = a*xl * third
108 ncor(2,inoe) = b*yl * third
109 ncor(3,inoe) = c*zl * third
110 xl = xl + dx0(i)
111 yl = yl + dy0(i)
112 zl = zl + dz0(i)
113 ENDDO
114 xx0 = xx0 + dx1(i)
115 yy0 = yy0 + dy1(i)
116 zz0 = zz0 + dz1(i)
117 ENDDO
118 ENDDO
119C-------------------------------------------------------
120C - Projection radiale sur l'ellipsoide.
121C - Passage au repere global.
122C-------------------------------------------------------
123 an=a**idg
124 bn=b**idg
125 cn=c**idg
126 inoe=0
127 DO i=1,384
128 inoe=inoe+1
129 xl=ncor(1,inoe)
130 yl=ncor(2,inoe)
131 zl=ncor(3,inoe)
132C
133 xln=xl**idg
134 yln=yl**idg
135 zln=zl**idg
136 e=abs(xln)/an+abs(yln)/bn+abs(zln)/cn
137 e=exp(log(e)/dgr)
138 xl=xl/e
139 yl=yl/e
140 zl=zl/e
141C
142 xx =rot(1)*xl+rot(4)*yl+rot(7)*zl
143 yy =rot(2)*xl+rot(5)*yl+rot(8)*zl
144 zz =rot(3)*xl+rot(6)*yl+rot(9)*zl
145 ncor(1,inoe)=xx+xg
146 ncor(2,inoe)=yy+yg
147 ncor(3,inoe)=zz+zg
148 END DO
149C-------------------------------------------------------
150C Ecriture des noeuds.
151C-------------------------------------------------------
152 inoe=0
153 DO i=1,384
154 inoe=inoe+1
155 r4 = ncor(1,inoe)
156 CALL write_r_c(r4,1)
157 r4 = ncor(2,inoe)
158 CALL write_r_c(r4,1)
159 r4 = ncor(3,inoe)
160 CALL write_r_c(r4,1)
161 END DO
162C-------------------------------------------------------
163 200 CONTINUE
164C-------------------------------------------------------
165 RETURN
166 END
#define my_real
Definition cppsort.cpp:32
subroutine dxyzsrg(nesrg, igrsurf, bufsf)
Definition dxyzsrg.F:31
void write_r_c(float *w, int *len)