OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spadasm.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!|| spadasm0 ../engine/source/elements/sph/spadasm.F
25!||--- called by ------------------------------------------------------
26!|| sphprep ../engine/source/elements/sph/sphprep.F
27!||--- uses -----------------------------------------------------
28!|| sphbox ../engine/share/modules/sphbox.F
29!||====================================================================
30 SUBROUTINE spadasm0(
31 1 X ,V ,MS ,SPBUF ,ITAB ,
32 2 KXSP ,IXSP ,NOD2SP ,ISPCOND ,ISPSYM ,
33 3 XFRAME ,XSPSYM ,WSP2SORT,ITASK )
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE sphbox
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "sphcom.inc"
46#include "param_c.inc"
47#include "task_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER KXSP(NISP,*),IXSP(KVOISPH,*),NOD2SP(*),ITAB(*),
52 . ISPCOND(NISPCOND,*),ISPSYM(NSPCOND,*),WSP2SORT(*),
53 . ITASK
55 . x(3,*), v(3,*), ms(*), spbuf(nspbuf,*),
56 . xframe(nxframe,*), xspsym(3,*)
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER K,N,INOD,JS,
61 . IS,IC,NC,NS
62 my_real
63 . xi,yi,zi,
64 . ox,oy,oz,nx,ny,nz,
65 . xs,ys,zs,vxs,vys,vzs,vn,dd
66C-----------------------------------------------
67 DO nc=1,nspcond
68 is=ispcond(3,nc)
69 ic=ispcond(2,nc)
70 ox=xframe(10,is)
71 oy=xframe(11,is)
72 oz=xframe(12,is)
73 nx=xframe(3*(ic-1)+1,is)
74 ny=xframe(3*(ic-1)+2,is)
75 nz=xframe(3*(ic-1)+3,is)
76 DO ns =1+itask,nsp2sort,nthread
77 n=wsp2sort(ns)
78 js=ispsym(nc,n)
79 IF(js>0)THEN
80 inod=kxsp(3,n)
81 xi =x(1,inod)
82 yi =x(2,inod)
83 zi =x(3,inod)
84 dd=(xi-ox)*nx+(yi-oy)*ny+(zi-oz)*nz
85 xs=xi-two*dd*nx
86 ys=yi-two*dd*ny
87 zs=zi-two*dd*nz
88C
89 xspsym(1,js)=xs
90 xspsym(2,js)=ys
91 xspsym(3,js)=zs
92 ENDIF
93 ENDDO
94C
95C Particules symetriques de particules remotes
96C
97 DO ns = 1+itask, nsphr,nthread
98 js=ispsymr(nc,ns)
99 IF(js>0)THEN
100 xi =xsphr(3,ns)
101 yi =xsphr(4,ns)
102 zi =xsphr(5,ns)
103 dd=(xi-ox)*nx+(yi-oy)*ny+(zi-oz)*nz
104 xs=xi-two*dd*nx
105 ys=yi-two*dd*ny
106 zs=zi-two*dd*nz
107C
108 xspsym(1,js)=xs
109 xspsym(2,js)=ys
110 xspsym(3,js)=zs
111 END IF
112 END DO
113 ENDDO
114C-------------------------------------------
115 RETURN
116 END
117C
118!||====================================================================
119!|| spadasm ../engine/source/elements/sph/spadasm.F
120!||--- called by ------------------------------------------------------
121!|| sphprep ../engine/source/elements/sph/sphprep.F
122!||--- uses -----------------------------------------------------
123!|| sphbox ../engine/share/modules/sphbox.f
124!||====================================================================
125 SUBROUTINE spadasm(
126 1 X ,V ,MS ,SPBUF ,ITAB ,
127 2 KXSP ,IXSP ,NOD2SP ,ISPCOND ,ISPSYM ,
128 3 XFRAME ,VSPSYM ,WSP2SORT ,ITASK )
129C-----------------------------------------------
130C M o d u l e s
131C-----------------------------------------------
132 USE sphbox
133C-----------------------------------------------
134C I m p l i c i t T y p e s
135C-----------------------------------------------
136#include "implicit_f.inc"
137C-----------------------------------------------
138C C o m m o n B l o c k s
139C-----------------------------------------------
140#include "sphcom.inc"
141#include "param_c.inc"
142#include "task_c.inc"
143C-----------------------------------------------
144C D u m m y A r g u m e n t s
145C-----------------------------------------------
146 INTEGER KXSP(NISP,*),IXSP(KVOISPH,*),NOD2SP(*),ITAB(*),
147 . ISPCOND(NISPCOND,*),ISPSYM(NSPCOND,*),WSP2SORT(*),
148 . ITASK
149 my_real
150 . X(3,*), V(3,*), MS(*), SPBUF(NSPBUF,*),
151 . XFRAME(NXFRAME,*), VSPSYM(3,*)
152C-----------------------------------------------
153C L o c a l V a r i a b l e s
154C-----------------------------------------------
155 INTEGER K,N,INOD,JS,
156 . IS,IC,NC,ISLIDE,NS
157 my_real
158 . VXI,VYI,VZI,
159 . NX,NY,NZ,
160 . VXS,VYS,VZS,VN
161C-----------------------------------------------
162C routine simplifiee (traitement sur XSPSYM effectue ds SPADASM0)
163 DO nc=1,nspcond
164 is=ispcond(3,nc)
165 ic=ispcond(2,nc)
166 islide=ispcond(5,nc)
167 nx=xframe(3*(ic-1)+1,is)
168 ny=xframe(3*(ic-1)+2,is)
169 nz=xframe(3*(ic-1)+3,is)
170 DO ns =1+itask,nsp2sort,nthread
171 n=wsp2sort(ns)
172 js=ispsym(nc,n)
173 IF(js>0)THEN
174 inod=kxsp(3,n)
175 vxi=v(1,inod)
176 vyi=v(2,inod)
177 vzi=v(3,inod)
178C
179 IF(islide==0)THEN
180 vxs=-vxi
181 vys=-vyi
182 vzs=-vzi
183 ELSE
184 vn=vxi*nx+vyi*ny+vzi*nz
185 vxs=vxi-two*vn*nx
186 vys=vyi-two*vn*ny
187 vzs=vzi-two*vn*nz
188 ENDIF
189 vspsym(1,js)=vxs
190 vspsym(2,js)=vys
191 vspsym(3,js)=vzs
192 ENDIF
193 ENDDO
194C
195C Particules symetriques de particules remotes
196C
197 DO ns = 1+itask,nsphr,nthread
198 js=ispsymr(nc,ns)
199 IF(js>0)THEN
200 vxi=xsphr(9,ns)
201 vyi=xsphr(10,ns)
202 vzi=xsphr(11,ns)
203C
204 IF(islide==0)THEN
205 vxs=-vxi
206 vys=-vyi
207 vzs=-vzi
208 ELSE
209 vn=vxi*nx+vyi*ny+vzi*nz
210 vxs=vxi-two*vn*nx
211 vys=vyi-two*vn*ny
212 vzs=vzi-two*vn*nz
213 END IF
214 vspsym(1,js)=vxs
215 vspsym(2,js)=vys
216 vspsym(3,js)=vzs
217 END IF
218 END DO
219 ENDDO
220C-------------------------------------------
221 RETURN
222 END
#define my_real
Definition cppsort.cpp:32
integer, dimension(:,:), allocatable ispsymr
Definition sphbox.F:93
integer nsphr
Definition sphbox.F:83
subroutine spadasm0(x, v, ms, spbuf, itab, kxsp, ixsp, nod2sp, ispcond, ispsym, xframe, xspsym, wsp2sort, itask)
Definition spadasm.F:34
subroutine spadasm(x, v, ms, spbuf, itab, kxsp, ixsp, nod2sp, ispcond, ispsym, xframe, vspsym, wsp2sort, itask)
Definition spadasm.F:129