OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lgmini_rby.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"
#include "lagmult.inc"
#include "com04_c.inc"
#include "scr17_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine lgmini_rby (npbyl, lpbyl, rbyl, mass, iner, x, v, vr, itab, nom_opt)

Function/Subroutine Documentation

◆ lgmini_rby()

subroutine lgmini_rby ( integer, dimension(nnpby,*) npbyl,
integer, dimension(*) lpbyl,
rbyl,
mass,
iner,
x,
v,
vr,
integer, dimension(*) itab,
integer, dimension(lnopt1,*) nom_opt )

Definition at line 33 of file lgmini_rby.F.

35 USE message_mod
37C----------------------------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "param_c.inc"
45#include "lagmult.inc"
46#include "com04_c.inc"
47#include "scr17_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NPBYL(NNPBY,*), LPBYL(*), ITAB(*)
52 my_real rbyl(nrby,*),mass(*),iner(*),x(3,*), v(3,*), vr(3,*)
53 INTEGER NOM_OPT(LNOPT1,*)
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I,J,N,NN,M,IK,IC,MSL,NSL,TNSL,ICDG
58 my_real rx,ry,rz,masrb
59 INTEGER ID
60 CHARACTER(LEN=NCHARTITLE) :: TITR
61C======================================================================|
62 tnsl = 0
63 DO n=1,nrbylag
64 m = npbyl(1,n)
65 msl = npbyl(2,n)
66 icdg = npbyl(3,n)
67 nsl = msl - 1
68 mass(m) = mass(m) + rbyl(1,n)
69 iner(m) = iner(m) + rbyl(2,n)
70 id=nom_opt(1,nrbykin+n)
71 CALL fretitl2(titr, nom_opt(lnopt1-ltitr+1,nrbykin+n),ltitr)
72 IF(mass(m)==zero.OR.iner(m)==zero) THEN
73 CALL ancmsg(msgid=273,
74 . msgtype=msgwarning,
75 . anmode=aninfo_blind_1,
76 . i1=id,
77 . c1=titr)
78 ENDIF
79 IF(mass(m)==zero) mass(m)= em15
80 IF(iner(m)==zero) iner(m)= em15
81C----- CORRECTION DE LA CENTRE DE GRAVITE DU MAIN
82 IF(icdg==1)THEN
83C----- CDG TOTAL
84 masrb = mass(m)
85 DO j=1,3
86 x(j,m)=x(j,m)*mass(m)
87 ENDDO
88 DO i=1,nsl
89 nn = lpbyl(tnsl+i)
90 DO j=1,3
91 x(j,m) = x(j,m)+x(j,nn)*mass(nn)
92 ENDDO
93 masrb = masrb+mass(nn)
94 ENDDO
95 IF(masrb<=em30) THEN
96 CALL ancmsg(msgid=273,
97 . msgtype=msgwarning,
98 . anmode=aninfo_blind_1,
99 . i1=id,
100 . c1=titr)
101 RETURN
102 ENDIF
103 DO j=1,3
104 x(j,m)=x(j,m)/masrb
105 ENDDO
106 ELSEIF(icdg==2)THEN
107C----- CDG DES NOEUDS SECONDS
108 masrb=zero
109 DO j=1,3
110 x(j,m)=zero
111 ENDDO
112 DO i=1,nsl
113 nn = lpbyl(tnsl+i)
114 DO j=1,3
115 x(j,m) = x(j,m)+x(j,nn)*mass(nn)
116 ENDDO
117 masrb = masrb+mass(nn)
118 ENDDO
119C
120 IF(masrb<=em30) THEN
121 CALL ancmsg(msgid=273,
122 . msgtype=msgwarning,
123 . anmode=aninfo_blind_1,
124 . i1=id,
125 . c1=titr)
126 RETURN
127 ENDIF
128 DO j=1,3
129 x(j,m)=x(j,m)/masrb
130 ENDDO
131 masrb=masrb+mass(m)
132 ENDIF
133 IF(mass(m)==zero.OR.iner(m)==zero) THEN
134 CALL ancmsg(msgid=679,
135 . msgtype=msgerror,
136 . anmode=aninfo_blind_1,
137 . i1=id,
138 . c1=titr,
139 . c2='ON MAIN NODE')
140 ENDIF
141 tnsl = tnsl + 3*msl
142 ENDDO
143C-----------
144 RETURN
#define my_real
Definition cppsort.cpp:32
initmumps id
integer, parameter nchartitle
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
subroutine fretitl2(titr, iasc, l)
Definition freform.F:804