OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
rbyvit.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!|| rbyvit ../engine/source/constraints/general/rbody/rbyvit.F
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- calls -----------------------------------------------------
28!|| rgbodv ../engine/source/constraints/general/rbody/rgbodv.F
29!|| spmd_all_dmax ../engine/source/mpi/elements/spmd_sph.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../engine/share/message_module/message_mod.f
32!||====================================================================
33 SUBROUTINE rbyvit(RBY ,X ,V ,VR ,SKEW,
34 2 FSAV ,LPBY ,NPBY ,ISKEW,ITAB,
35 3 WEIGHT,A ,AR ,MS ,IN ,
36 4 KIND ,IRBKIN_L,NRBYKIN_L,NODREAC,FTHREAC,
37 5 FREAC ,NHIER_RBY)
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE message_mod
42C----6---------------------------------------------------------------7---------8
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "com04_c.inc"
51#include "param_c.inc"
52C-----------------------------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER WEIGHT(*),LPBY(*),NPBY(NNPBY,*),ISKEW(*),ITAB(*),
56 . KIND(NRBYKIN),IRBKIN_L(*),NRBYKIN_L,NODREAC(*)
57 INTEGER, INTENT(IN) :: NHIER_RBY
58C REAL
60 . rby(nrby,*) ,x(3,*) ,v(3,*) ,vr(3,*),skew(*),
61 . fsav(nthvki,*) ,a(3,*),ar(3,*),in(*),ms(*),fthreac(*),freac(*)
62C----------------------------------------------3
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER J,K,N,KK,IFAIL,ICOMM,IM
66 my_real
67 . FN, FT,EXPN,EXPT
68 my_real, DIMENSION(:), ALLOCATABLE ::
69 . crit
70C REAL
71 SAVE crit
72C-----------------------------------------------
73!$OMP SINGLE
74 IF(nrbfail /= 0 .AND. nspmd > 1)THEN
75 ALLOCATE(crit(nrbykin))
76 crit(1:nrbykin) = zero
77 ELSE
78 ALLOCATE(crit(0))
79 END IF
80!$OMP END SINGLE
81!
82 IF (nhier_rby ==0) THEN
83C-------------------------------------
84C COMPUTATION FOR SUPER RIGID BODIES (non multi-thread) on first free task
85C-------------------------------------
86
87!$OMP SINGLE
88
89 DO kk=1,nrbykin_l
90 n=irbkin_l(kk)
91 k = kind(n)
92 IF(npby(7,n)>0.AND.npby(4,n)/=0)THEN
93 j = ninter+nrwall+n
94 ifail = npby(18,n)
95 fn = rby(26,n)
96 ft = rby(27,n)
97 expn = rby(28,n)
98 expt = rby(29,n)
99C correction of global variables done in rbycor
100 CALL rgbodv(v ,vr ,x ,rby(1,n) ,lpby(k),
101 2 npby(1,n),skew ,iskew ,fsav(1,j) ,itab ,
102 3 weight ,a ,ar ,ms ,in ,
103 4 npby(4,n),npby(6,n) ,ifail ,fn ,expn ,
104 5 ft ,expt ,rby(30,n),nodreac,fthreac ,
105 6 freac )
106C
107 IF(nrbfail /= 0 .AND. nspmd > 1) crit(n)= rby(30,n)
108C
109 ENDIF
110 ENDDO
111
112!$OMP END SINGLE
113
114C-------------------------------------
115C FORCE COMPUTATION FOR CLASSICAL RIGID BODIES (multi-thread)
116C-------------------------------------
117
118!$OMP DO SCHEDULE(DYNAMIC,1)
119
120 DO kk=1,nrbykin_l
121 n=irbkin_l(kk)
122 k = kind(n)
123 IF(npby(7,n)>0.AND.npby(4,n)==0)THEN
124 j = ninter+nrwall+n
125 ifail = npby(18,n)
126 fn = rby(26,n)
127 ft = rby(27,n)
128 expn = rby(28,n)
129 expt = rby(29,n)
130C correction of global variables done in rbycor
131 CALL rgbodv(v ,vr ,x ,rby(1,n) ,lpby(k),
132 2 npby(1,n),skew ,iskew ,fsav(1,j) ,itab ,
133 3 weight ,a ,ar ,ms ,in ,
134 4 npby(4,n),npby(6,n) ,ifail ,fn ,expn ,
135 5 ft ,expt ,rby(30,n),nodreac,fthreac ,
136 6 freac )
137C
138 IF(nrbfail /= 0 .AND. nspmd > 1) crit(n)= rby(30,n)
139C
140 ENDIF
141 ENDDO
142
143!$OMP END DO
144 ELSE ! hierarchy level>0
145!$OMP SINGLE
146 DO n=nrbykin,1,-1
147 k = kind(n)
148 im =npby(1,n)
149 IF(npby(7,n)>0 .AND. im>0) THEN
150 j = ninter+nrwall+n
151 ifail = npby(18,n)
152 fn = rby(26,n)
153 ft = rby(27,n)
154 expn = rby(28,n)
155 expt = rby(29,n)
156! correction variables globales faites dans rbycor
157 CALL rgbodv(v ,vr ,x ,rby(1,n) ,lpby(k),
158 2 npby(1,n),skew ,iskew ,fsav(1,j) ,itab ,
159 3 weight ,a ,ar ,ms ,in ,
160 4 npby(4,n),npby(6,n) ,ifail ,fn ,expn ,
161 5 ft ,expt ,rby(30,n),nodreac,fthreac ,
162 6 freac )
163!
164 IF(nrbfail /= 0 .AND. nspmd > 1) crit(n)= rby(30,n)
165!
166 ENDIF
167 ENDDO
168!$OMP END SINGLE
169 END IF !(NHIER_RBY ==0) THEN
170C
171!$OMP SINGLE
172 IF(nrbfail /= 0 .AND. nspmd > 1)THEN
173 CALL spmd_all_dmax(crit,nrbykin)
174 DO n=1,nrbykin
175 rby(30,n) = crit(n)
176 ENDDO
177 END IF
178 DEALLOCATE(crit)
179!$OMP END SINGLE
180C
181 RETURN
182 END
#define my_real
Definition cppsort.cpp:32
subroutine rbyvit(rby, x, v, vr, skew, fsav, lpby, npby, iskew, itab, weight, a, ar, ms, in, kind, irbkin_l, nrbykin_l, nodreac, fthreac, freac, nhier_rby)
Definition rbyvit.F:38
subroutine rgbodv(v, vr, x, rby, nod, nby, skew, iskew, fs, itab, weight, a, ar, ms, in, isens, id, ifail, fny, expn, fty, expt, crit, nodreac, fthreac, freac)
Definition rgbodv.F:41
subroutine spmd_all_dmax(v, len)
Definition spmd_sph.F:1146