OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
rbyonf.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!|| rbyonf ../engine/source/constraints/general/rbody/rbyonf.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../engine/source/input/lectur.F
27!||--- calls -----------------------------------------------------
28!|| rbypid ../engine/source/constraints/general/rbody/rbypid.F
29!|| spmd_glob_isum9 ../engine/source/mpi/interfaces/spmd_th.F
30!|| spmd_ibcast ../engine/source/mpi/generic/spmd_ibcast.F
31!||--- uses -----------------------------------------------------
32!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
33!|| element_mod ../common_source/modules/elements/element_mod.F90
34!||====================================================================
35 SUBROUTINE rbyonf(IPARG ,IPARI ,MS ,IN ,
36 2 IXS ,IXQ ,IXC ,IXT ,IXP ,
37 3 IXR ,SKEW ,ITAB ,ITABM1 ,ISKWN ,
38 4 NPBY ,ONOF ,NRBYNF,ITAG ,LPBY ,
39 5 RBY ,X ,V ,VR ,IXTG ,
40 6 IGRV ,IBGR ,WEIGHT,FR_RBY2,PARTSAV,
41 7 IPART ,ELBUF_TAB,ICFIELD,LCFIELD,TAGSLV_RBY)
42C-----------------------------------------------
43C M o d u l e s
44C-----------------------------------------------
45 USE elbufdef_mod
46 use element_mod , only : nixs,nixq,nixc,nixt,nixp,nixr,nixtg
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "com01_c.inc"
55#include "com04_c.inc"
56#include "param_c.inc"
57#include "units_c.inc"
58#include "task_c.inc"
59#include "scr17_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER IPARG(NPARG,*), IPARI(*), IXS(NIXS,*), IXQ(NIXQ,*),
64 . IXC(NIXC,*), IXT(NIXT,*), IXP(NIXP,*), IXR(NIXR,*),
65 . ITAB(*), ITABM1(*),IGRV(NIGRV,*),IBGR(*),IPART(*),
66 . ISKWN(LISKN,*), NPBY(NNPBY,*),ITAG(*),LPBY(*), IXTG(NIXTG,*),
67 . WEIGHT(*), FR_RBY2(*), ICFIELD(SIZFIELD,*), LCFIELD(*), TAGSLV_RBY(*)
68 INTEGER ONOF,NRBYNF,PRI_OFF
69C REAL
71 . skew(lskew,*),ms(*),in(*),rby(nrby,*),x(3,*),
72 . v(3,*),vr(3,*),partsav(*)
73 TYPE(elbuf_struct_), DIMENSION(NGROUP) :: ELBUF_TAB
74C-----------------------------------------------
75C L o c a l V a r i a b l e s
76C-----------------------------------------------
77 INTEGER I, J ,ITEMP(10),K, N,NSL,NN,IAD,ONOF1,ISENS,IACTI,
78 . ONFELT,K1,K2,K3,K4,K5,K6,K7
79C======================================================================|
80C modification of the rigid bodies
81C-------------------------------------------
82 k1=1+lipart1*npart+2*9*npart
83 k2=k1+numels
84 k3=k2+numelq
85 k4=k3+numelc
86 k5=k4+numelt
87 k6=k5+numelp
88 k7=k6+numelr
89C
90 DO i=1,numnod
91 itag(i)=0
92 ENDDO
93C
94 DO i=1,numnod
95 itag(i+numnod)=0
96 ENDDO
97C
98 DO n=1,nrbykin
99 isens=npby(4,n)
100 iacti=npby(7,n)
101 IF(isens==0.AND.iacti==1.AND.npby(1,n)>0)
102 . itag(npby(1,n)+numnod)=n
103 ENDDO
104C
105 DO i=1,(nrbynf+9)/10
106 READ(iin,'(10I10)')(itemp(j),j=1,10)
107 DO 120 j=1,10
108 IF(itemp(j)==0) GOTO 120
109 k = 1
110 DO n=1,nrbykin
111 IF(npby(1,n)>0) THEN
112 IF(itemp(j)==itab(npby(1,n))) GOTO 110
113 ENDIF
114 k=k+npby(2,n)
115 ENDDO
116 n = 0
117 110 CONTINUE
118C in spmd, the concerned rigid body must be communicated if n<>0 on a processor
119C si rigid body present sur le proc N = rb trouve
120 IF(n/=0) n = n*weight(npby(1,n))
121C reduction to find the value of n (n = 0 everywhere except on the main processor)
122 IF(nspmd > 1) THEN
123 CALL spmd_glob_isum9(n,1)
124C broadcast of n to all processors
125 CALL spmd_ibcast(n,n,1,1,0,2)
126 ENDIF
127C if N = 0, then the rby had not been found on any proc
128 IF(n==0) GOTO 120
129C
130 IF(onof==0)THEN
131 IF(ispmd==0)
132 . WRITE(iout,'(/A,I9,A)')' RIGID BODY:',itemp(j),' SET OFF'
133 ELSE
134 IF(ispmd==0)
135 . WRITE(iout,'(/A,I9,A)')' RIGID BODY:',itemp(j),' SET ON'
136 ENDIF
137C
138 isens=npby(4,n)
139 iacti=npby(7,n)
140 IF(isens/=0)THEN
141 IF(iacti>1)THEN
142C body waiting for deactivation, override sensor request.
143 iacti=1
144 npby(7,n)=iacti
145 ELSEIF(iacti<0)THEN
146C body waiting for activation, override sensor request.
147 iacti=0
148 npby(7,n)=iacti
149 ENDIF
150 ENDIF
151C
152 onfelt= 1-onof
153 ! ONFELT= 0 : deactivation of elements
154 ! ONFELT= 1 : activation of elements
155 onof1 = onof
156 pri_off = 0 ! full printout
157 IF(onof==1.AND.npby(7,n)/=0) onof1 = -1
158 ! ONOF1 = -1 nothing against rbody (rbody was already active)
159 ! = 0 ! deactivate rbody
160 ! = 1 ! activate rbody
161 CALL rbypid(
162 1 iparg ,ipari ,ms ,in ,
163 2 ixs ,ixq ,ixc ,ixt ,ixp ,
164 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
165 4 npby(1,n),onof1 ,itag ,lpby(k) ,
166 5 x ,v ,vr ,rby(1,n),
167 6 ixtg ,npby ,rby ,lpby ,0 ,
168 7 fr_rby2 ,n ,onfelt ,weight ,partsav ,
169 8 ipart(k3),npby(2,n) ,elbuf_tab,pri_off)
170 npby(7,n)=onof
171 120 CONTINUE
172 ENDDO
173C------------------------------------
174C tag of the secondary rby nodes with gravity or load/centrifugal
175C for calculation of the work of external forces
176C-------------------------------------
177 tagslv_rby(1:numnod)=0
178C
179 k=0
180 DO n=1,nrbykin
181 onof1=npby(7,n)
182 nsl=npby(2,n)
183 IF(onof1>=1)THEN
184 DO i=1,nsl
185 tagslv_rby(lpby(i+k))=n
186 ENDDO
187 ENDIF
188 k=k+nsl
189 ENDDO
190C
191 DO k=1,ngrav
192 nn =igrv(1,k)
193 iad=igrv(4,k)
194 DO i=iad,iad+nn-1
195 n=iabs(ibgr(i))
196 IF(tagslv_rby(n) /= 0)THEN
197 ibgr(i) = -n
198 ELSE
199 ibgr(i) = n
200 ENDIF
201 ENDDO
202 ENDDO
203C
204 DO k=1,nloadc
205 nn = icfield(1,k)
206 iad = icfield(4,k)
207 DO i=1,nn
208 n=lcfield(iad+i-1)
209 IF(tagslv_rby(n) /= 0)lcfield(iad+i-1) = -n
210 END DO
211 ENDDO
212C-----------
213 RETURN
214 END
215!||====================================================================
216!|| rbysens ../engine/source/constraints/general/rbody/rbyonf.F
217!||--- called by ------------------------------------------------------
218!|| resol ../engine/source/engine/resol.F
219!||--- calls -----------------------------------------------------
220!|| rbypid ../engine/source/constraints/general/rbody/rbypid.F
221!||--- uses -----------------------------------------------------
222!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.f90
223!|| element_mod ../common_source/modules/elements/element_mod.F90
224!|| sensor_mod ../common_source/modules/sensor_mod.F90
225!||====================================================================
226 SUBROUTINE rbysens(IPARG,IPARI ,MS ,IN ,
227 2 IXS ,IXQ ,IXC ,IXT ,IXP ,
228 3 IXR ,SKEW ,ITAB ,ITABM1,ISKWN,
229 4 NPBY ,ITAG ,LPBY ,FSKY ,NSENSOR,
230 5 RBY ,X ,V ,VR ,IXTG ,
231 6 IGRV ,IBGR ,SENSOR_TAB,A ,AR ,
232 7 FSAV,STIFN,STIFR ,FANI ,WEIGHT,
233 8 DMAST,DINERT,BUFSF,FR_RBY2,PARTSAV,
234 9 IPART ,ELBUF_TAB,ICFIELD,LCFIELD,TAGSLV_RBY)
235C-----------------------------------------------
236C M o d u l e s
237C-----------------------------------------------
238 USE elbufdef_mod
239 USE sensor_mod
240 use element_mod , only : nixs,nixq,nixc,nixt,nixp,nixr,nixtg
241C-----------------------------------------------
242C I m p l i c i t T y p e s
243C-----------------------------------------------
244#include "implicit_f.inc"
245C-----------------------------------------------
246C C o m m o n B l o c k s
247C-----------------------------------------------
248#include "com01_c.inc"
249#include "com04_c.inc"
250#include "com08_c.inc"
251#include "param_c.inc"
252#include "units_c.inc"
253#include "task_c.inc"
254#include "parit_c.inc"
255#include "scr17_c.inc"
256C-----------------------------------------------
257C D u m m y A r g u m e n t s
258C-----------------------------------------------
259 INTEGER ,INTENT(IN) :: NSENSOR
260 INTEGER IPARG(NPARG,*), IPARI(*), IXS(NIXS,*), IXQ(NIXQ,*),
261 . IXC(NIXC,*), IXT(NIXT,*), IXP(NIXP,*), IXR(NIXR,*),
262 . ITAB(*), ITABM1(*),IGRV(NIGRV,*),IBGR(*),
263 . ISKWN(LISKN,*), NPBY(NNPBY,*),ITAG(*),LPBY(*), IXTG(NIXTG,*),
264 . WEIGHT(*), IPART(*), FR_RBY2(3,*), ICFIELD(SIZFIELD,*), LCFIELD(*), TAGSLV_RBY(*)
265C REAL
266 my_real
267 . SKEW(LSKEW,*),MS(*),IN(*),RBY(NRBY,*),X(3,*),
268 . V(3,*),VR(3,*),FSKY(*), A(3,*) ,AR(3,*),
269 . FSAV(NTHVKI,*), STIFN(*),STIFR(*),FANI(3,*),
270 . DMAST, DINERT, BUFSF(*),PARTSAV(*)
271 TYPE(ELBUF_STRUCT_), DIMENSION(NGROUP) :: ELBUF_TAB
272 TYPE(SENSOR_STR_) ,DIMENSION(NSENSOR) ,INTENT(IN) :: SENSOR_TAB
273C-----------------------------------------------
274C L o c a l V a r i a b l e s
275C-----------------------------------------------
276 INTEGER I ,K, N,NSL,NN,IAD,ONOF,ONOF1,ISENS,IACTI,
277 .
278 .
279 . ONFELT,K1,K2,K3,K4,K5,K6,K7,IFAIL,ELT_ACTIV,PRI_OFF
280 my_real
281 . crit
282C======================================================================|
283C ACIVATION/DEACTIVATION DES RIGID BODY
284C Deactivation ::
285C Elements are activated first
286C Rbody is deactivated at the end (after 2 cycles)
287C Activation ::
288C Rbody is activated at the same time as the elements are deactivated
289C-------------------------------------------
290 k1=1+lipart1*npart+2*9*npart
291 k2=k1+numels
292 k3=k2+numelq
293 k4=k3+numelc
294 k5=k4+numelt
295 k6=k5+numelp
296 k7=k6+numelr
297C-------------------------------------------
298C ITAG :: Main node of active rbody w/o sensor => Rbody number
299C is used for initialization of mass & inertia if the rbody is included into the rbody being activated
300C i.e. mass and inertia of the "sub-rbody" secnd nodes must not be counted twice
301C-------------------------------------------
302 DO i=1,numnod
303 itag(i)=0
304 ENDDO
305C
306 DO i=1,numnod
307 itag(i+numnod)=0
308 ENDDO
309C
310 DO n=1,nrbykin
311 isens = npby(4,n)
312 iacti = npby(7,n)
313 IF(isens==0 .AND. iacti==1 .AND. npby(1,n)>0)
314 . itag(npby(1,n)+numnod)=n
315 ENDDO
316C-------------------------------------------
317C 1. Looking for sensor deactivation & rbody activation
318C-------------------------------------------
319 k = 1
320 onfelt=1
321 onof1 =0
322 elt_activ =0
323 DO n=1,nrbykin
324 isens = npby(4,n)
325 iacti = npby(7,n)
326 ifail = npby(18,n)
327 crit = rby(30,n)
328 IF(isens/=0 .AND. (ifail/=1 .OR. crit < one))THEN
329 IF (iacti==0 .AND. tt <= sensor_tab(isens)%TSTART) THEN
330C
331C - rbody is activated and elements are deactivated at the same time
332C - unless failure criteria has been reached already
333C
334 IF (ispmd==0) THEN
335 WRITE(iout,'(/A,I9,A)')' RIGID BODY:',
336 . npby(6,n),' SET ON'
337 WRITE(istdo,'(/A,I9,A)')' RIGID BODY:',
338 . npby(6,n),' ON'
339 ENDIF
340C
341 onof = 1 ! activate rbody
342 onfelt= 0 ! deactivation of elements
343 pri_off = 0 ! full printout
344 CALL rbypid( iparg ,ipari ,ms ,in ,
345 2 ixs ,ixq ,ixc ,ixt ,ixp ,
346 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
347 4 npby(1,n),onof ,itag ,lpby(k) ,
348 5 x ,v ,vr ,rby(1,n),
349 6 ixtg ,npby ,rby ,lpby ,1 ,
350 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
351 8 ipart(k3),npby(2,n) ,elbuf_tab,pri_off)
352 onof1 = 1 ! at least 1 rbody is activated or deactivated
353 npby(7,n)=1
354 ELSEIF (iacti>1 .AND. tt <= sensor_tab(isens)%TSTART) THEN
355C
356C - rbody is waiting for deactivation :
357C Sensor status changes again => override previous request unless failure criteria was already reached.
358C
359 onof = -1 ! nothing against rbody (rbody was not yet deactivated)
360 onfelt= 0 ! deactivation of elements
361 pri_off = 0 ! full printout
362 CALL rbypid( iparg ,ipari ,ms ,in ,
363 2 ixs ,ixq ,ixc ,ixt ,ixp ,
364 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
365 4 npby(1,n),onof ,itag ,lpby(k) ,
366 5 x ,v ,vr ,rby(1,n),
367 6 ixtg ,npby ,rby ,lpby ,1 ,
368 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
369 8 ipart(k3),npby(2,n) ,elbuf_tab,pri_off)
370 npby(7,n)=1
371 ENDIF
372 ENDIF
373 k=k+npby(2,n)
374 ENDDO
375 IF(onfelt==0.AND.iparit/=0)THEN ! reset forces of deactivated elements.
376 DO i=1,8*lsky
377 fsky(i)=0.0
378 ENDDO
379 ENDIF
380C-------------------------------------------
381C 2. Looking for sensors activation & deactivation of the rby
382C - elements will be activated yet, but rbody will be activated 2 cycles after
383C-------------------------------------------
384 k = 1
385 DO n=1,nrbykin
386 iacti=npby(7,n)
387 isens=npby(4,n)
388 ifail = npby(18,n)
389 crit = rby(30,n)
390 IF(isens/=0 .AND. (ifail/=1 .OR. crit < one) )THEN
391 IF (iacti == 1 .AND. tt > sensor_tab(isens)%TSTART) THEN
392 IF( tt> zero)THEN
393 iacti=4
394 npby(7,n)=iacti
395 IF (ispmd==0) THEN
396 WRITE(iout,'(/A,I9,A)')' RIGID BODY:',
397 . npby(6,n),' WILL BE SET OFF WITHIN 2 CYCLES'
398 WRITE(istdo,'(/A,I9,A)')' RIGID BODY:',
399 . npby(6,n),' WILL BE SET OFF WITHIN 2 CYCLES'
400 ENDIF
401C
402 onof = -1 ! nothing against rbody
403 onfelt= 1 ! activation of elements
404 pri_off = 0 ! full printout
405 CALL rbypid( iparg ,ipari ,ms ,in ,
406 2 ixs ,ixq ,ixc ,ixt ,ixp ,
407 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
408 4 npby(1,n),onof ,itag ,lpby(k) ,
409 5 x ,v ,vr ,rby(1,n),
410 6 ixtg ,npby ,rby ,lpby ,1 ,
411 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
412 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
413 elt_activ = 1 ! elts of at least 1 rby are activated
414 ELSE ! IF(TT>0.)THEN
415 IF (ispmd==0) THEN
416 WRITE(iout,'(/A,I9,A)')' RIGID BODY:',
417 . npby(6,n),' SET OFF'
418 WRITE(istdo,'(/A,I9,A)')' RIGID BODY:',
419 . npby(6,n),' OFF'
420 ENDIF
421C
422 onof = 0 ! deactivate rbody
423 onfelt= 1 ! activation of elements
424 pri_off = 0 ! full printout
425 CALL rbypid( iparg ,ipari ,ms ,in ,
426 2 ixs ,ixq ,ixc ,ixt ,ixp ,
427 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
428 4 npby(1,n),onof ,itag ,lpby(k) ,
429 5 x ,v ,vr ,rby(1,n),
430 6 ixtg ,npby ,rby ,lpby ,1 ,
431 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
432 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
433 npby(7,n)=0
434 onof1 = 1 ! at least 1 rbody is activated or deactivated
435 elt_activ = 1 ! elts of at least 1 rby are activated
436 ENDIF
437 ELSEIF(iacti==2)THEN
438C
439C Sensor has activated or Failure criteria has been reached ::
440C Last cycle wrt rbody deactivation <=> the rbody is deactivated (nothing wrt elements)
441C
442 IF (ispmd==0) THEN
443 WRITE(iout,'(/A,I9,A)')' RIGID BODY:',
444 . npby(6,n),' SET OFF'
445 WRITE(istdo,'(/A,I9,A)')' RIGID BODY:',
446 . npby(6,n),' OFF'
447 ENDIF
448C
449 onof = 0 ! deactivate rbody
450 onfelt= -1 ! nothing against elements
451 pri_off = 0 ! full printout
452 CALL rbypid( iparg ,ipari ,ms ,in ,
453 2 ixs ,ixq ,ixc ,ixt ,ixp ,
454 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
455 4 npby(1,n),onof ,itag ,lpby(k) ,
456 5 x ,v ,vr ,rby(1,n),
457 6 ixtg ,npby ,rby ,lpby ,1 ,
458 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
459 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
460 npby(7,n)=0
461 onof1 = 1 ! at least 1 rbody is activated or deactivated
462 ENDIF
463 ENDIF
464 k=k+npby(2,n)
465 ENDDO
466C-------------------------------------------
467C 3. Looking for failure criteria
468C - failure criteria will deactivate the rby
469C - elements will be activated yet, but rbody will be activated 2 cycles after
470C-------------------------------------------
471 k = 1
472 DO n=1,nrbykin
473 iacti=npby(7,n)
474 isens=npby(4,n)
475 ifail = npby(18,n)
476 crit = rby(30,n)
477 IF(iacti >= 1.AND.ifail == 1.AND.crit >= one)THEN ! If rbody is active
478 IF(iacti==1)THEN ! and failure is detected
479 IF(tt>0.)THEN
480 iacti=4
481 npby(7,n)=iacti
482 IF (ispmd==0) THEN
483 WRITE(iout,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
484 . npby(6,n),' WILL BE SET OFF WITHIN 2 CYCLES'
485 WRITE(istdo,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
486 . npby(6,n),' WILL BE SET OFF WITHIN 2 CYCLES'
487 ENDIF
488C
489 onof = -1 ! nothing against rbody
490 onfelt= 1 ! activation of elements
491 pri_off = 0 ! full printout
492 CALL rbypid( iparg ,ipari ,ms ,in ,
493 2 ixs ,ixq ,ixc ,ixt ,ixp ,
494 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
495 4 npby(1,n),onof ,itag ,lpby(k) ,
496 5 x ,v ,vr ,rby(1,n),
497 6 ixtg ,npby ,rby ,lpby ,1 ,
498 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
499 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
500 elt_activ = 1 ! elts of at least 1 rby are activated
501 ELSE ! IF(TT>0.)THEN (Failure most probably does not occur at time zero)
502 IF (ispmd==0) THEN
503 WRITE(iout,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
504 . npby(6,n),' SET OFF'
505 WRITE(istdo,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
506 . npby(6,n),' OFF'
507 ENDIF
508C
509 onof = 0 ! deactivate rbody
510 onfelt= 1 ! activation of elements
511 pri_off = 0 ! full printout
512 CALL rbypid( iparg ,ipari ,ms ,in ,
513 2 ixs ,ixq ,ixc ,ixt ,ixp ,
514 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
515 4 npby(1,n),onof ,itag ,lpby(k) ,
516 5 x ,v ,vr ,rby(1,n),
517 6 ixtg ,npby ,rby ,lpby ,1 ,
518 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
519 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
520 npby(7,n)=0
521 onof1 = 1 ! at least 1 rbody is activated or deactivated
522 ENDIF
523 ELSEIF(iacti==2)THEN
524C
525C Sensor has activated or Failure criteria has been reached ::
526C Last cycle wrt rbody deactivation <=> the rbody is deactivated (nothing wrt elements)
527C
528 IF (ispmd==0) THEN
529 WRITE(iout,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
530 . npby(6,n),' SET OFF'
531 WRITE(istdo,'(/A,I9,A)')' RIGID BODY FAILURE : RIGID BODY:',
532 . npby(6,n),' OFF'
533 ENDIF
534C
535 onof = 0 ! deactivate rbody
536 onfelt= -1 ! nothing against elements
537 pri_off = 0 ! full printout
538 CALL rbypid( iparg ,ipari ,ms ,in ,
539 2 ixs ,ixq ,ixc ,ixt ,ixp ,
540 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
541 4 npby(1,n),onof ,itag ,lpby(k) ,
542 5 x ,v ,vr ,rby(1,n),
543 6 ixtg ,npby ,rby ,lpby ,1 ,
544 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
545 8 ipart(k3),npby(2,n) ,elbuf_tab, pri_off)
546 npby(7,n)=0
547 onof1 = 1 ! at least 1 rbody is activated or deactivated
548 ENDIF
549 ENDIF
550 k=k+npby(2,n)
551 ENDDO
552C-------------------------------------------
553C 4. Loop over other rby in case of elts activation
554C - in case of hierarchy of rby elt is activated only
555C - if all rbys are deactivated
556C-------------------------------------------
557 IF(elt_activ == 1)THEN
558 k = 1
559 DO n=1,nrbykin
560 iacti=npby(7,n)
561 IF(iacti.EQ.1)THEN
562 onof = -1 ! nothing against rbody
563 onfelt= 0 ! deactivation of elements
564 pri_off = 1 ! printout for changed elements only
565 CALL rbypid( iparg ,ipari ,ms ,in ,
566 2 ixs ,ixq ,ixc ,ixt ,ixp ,
567 3 ixr ,skew ,itab ,itabm1 ,iskwn ,
568 4 npby(1,n),onof ,itag ,lpby(k) ,
569 5 x ,v ,vr ,rby(1,n),
570 6 ixtg ,npby ,rby ,lpby ,1 ,
571 7 fr_rby2 ,n ,onfelt,weight ,partsav ,
572 8 ipart(k3),npby(2,n) ,elbuf_tab,pri_off)
573 ENDIF
574 k=k+npby(2,n)
575 ENDDO
576 ENDIF
577C-------------------------------------------
578 DO n=1,nrbykin
579 iacti=npby(7,n)
580 IF(iacti>1)THEN
581 iacti=iacti-1
582 ENDIF
583 npby(7,n)=iacti
584 ENDDO
585C-------------------------------------
586C tag of the secondary rby nodes with gravity or load/centrifugal
587C for calculation of the work of external forces
588C-------------------------------------
589 IF(onof1==0) GOTO 200
590C
591 tagslv_rby(1:numnod)=0
592C
593 k=0
594 DO n=1,nrbykin
595 onof1=npby(7,n)
596 nsl=npby(2,n)
597 IF(onof1>=1)THEN
598 DO i=1,nsl
599 tagslv_rby(lpby(i+k))=n
600 ENDDO
601 ENDIF
602 k=k+nsl
603 ENDDO
604C
605 DO k=1,ngrav
606 nn =igrv(1,k)
607 iad=igrv(4,k)
608 DO i=iad,iad+nn-1
609 n=iabs(ibgr(i))
610 IF(tagslv_rby(n) /= 0)THEN
611 ibgr(i) = -n
612 ELSE
613 ibgr(i) = n
614 ENDIF
615 ENDDO
616 ENDDO
617C
618 DO k=1,nloadc
619 nn = icfield(1,k)
620 iad = icfield(4,k)
621 DO i=1,nn
622 n=lcfield(iad+i-1)
623 IF(tagslv_rby(n) /= 0)lcfield(iad+i-1) = -n
624 END DO
625 ENDDO
626C
627 200 CONTINUE
628 RETURN
629C
630 END
#define my_real
Definition cppsort.cpp:32
subroutine rbyonf(iparg, ipari, ms, in, ixs, ixq, ixc, ixt, ixp, ixr, skew, itab, itabm1, iskwn, npby, onof, nrbynf, itag, lpby, rby, x, v, vr, ixtg, igrv, ibgr, weight, fr_rby2, partsav, ipart, elbuf_tab, icfield, lcfield, tagslv_rby)
Definition rbyonf.F:42
subroutine rbysens(iparg, ipari, ms, in, ixs, ixq, ixc, ixt, ixp, ixr, skew, itab, itabm1, iskwn, npby, itag, lpby, fsky, nsensor, rby, x, v, vr, ixtg, igrv, ibgr, sensor_tab, a, ar, fsav, stifn, stifr, fani, weight, dmast, dinert, bufsf, fr_rby2, partsav, ipart, elbuf_tab, icfield, lcfield, tagslv_rby)
Definition rbyonf.F:235
subroutine rbypid(iparg, ipari, ms, in, ixs, ixq, ixc, ixt, ixp, ixr, skew, itab, itabm1, iskwn, npby, onof, itag, lpby, x, v, vr, rby, ixtg, npbyi, rbyi, lpbyi, iacts, fr_rby2, nrb, onfelt, weight, partsav, ipartc, nsn, elbuf_tab, pri_off)
Definition rbypid.F:49
subroutine spmd_ibcast(tabi, tabr, n1, n2, from, add)
Definition spmd_ibcast.F:57
subroutine spmd_glob_isum9(v, len)
Definition spmd_th.F:520