27 character*81 set,cbody(*)
29 integer ibody(3,*),nbody,nbody_,id,iamplitude,ilabel,i,j,id1,lc,
32 real*8 xbody(7,*),p1(3),p2(3),bodyf(3),xmagnitude,xbodyold(7,*),
37 if(label(1:7).eq.
'CENTRIF')
then 39 elseif(label(1:4).eq.
'GRAV')
then 41 elseif(label(1:6).eq.
'NEWTON')
then 48 dd=dsqrt(bodyf(1)*bodyf(1)+bodyf(2)*bodyf(2)+bodyf(3)*bodyf(3))
57 call cident(cbody,set,nbody,id)
62 if(cbody(id).eq.set)
then 63 if(ibody(1,id).eq.ilabel)
then 70 if(dabs(bodyf(1)*xbody(2,id)+bodyf(2)*xbody(3,id)+
71 & bodyf(3)*xbody(4,id)-1.d0).gt.1.d-10)
then 81 if(dabs(p2(1)*xbody(5,id)+p2(2)*xbody(6,id)+
82 & p2(3)*xbody(7,id)-1.d0).gt.1.d-10)
then 87 p(i)=xbody(1+i,id)-p1(i)
89 dd=dsqrt(p(1)*p(1)+p(2)*p(2)+p(3)*p(3))
94 if(dabs(p(1)*xbody(5,id)+p(2)*xbody(6,id)+
95 & p(3)*xbody(7,id)-1.d0).gt.1.d-10)
then 104 if(ibody(3,id).ne.lc)
then 109 ibody(2,id)=iamplitude
112 if(idefbody(id).eq.0)
then 113 xbody(1,id)=xmagnitude
116 if(ibody(2,id).ne.iamplitude)
then 117 write(*,*)
'*ERROR in bodyadd:' 118 write(*,*)
' it is not allowed to add' 119 write(*,*)
' two centrifugal loads with' 120 write(*,*)
' different amplitudes' 123 xbody(1,id)=xbody(1,id)+xmagnitude
131 elseif(ilabel.eq.2)
then 132 if(idefbody(id).eq.0)
then 133 xbody(1,id)=xmagnitude
136 if(ibody(2,id).ne.iamplitude)
then 137 write(*,*)
'*ERROR in bodyadd:' 138 write(*,*)
' it is not allowed to add' 139 write(*,*)
' two gravity loads with' 140 write(*,*)
' different amplitudes' 143 xbody(1,id)=xbody(1,id)+xmagnitude
161 if(nbody.gt.nbody_)
then 162 write(*,*)
'*ERROR in bodyadd: increase nbody_' 170 idefbody(i)=idefbody(i-1)
172 ibody(j,i)=ibody(j,i-1)
175 xbody(j,i)=xbody(j,i-1)
176 xbodyold(j,i)=xbodyold(j,i-1)
187 ibody(2,id1)=iamplitude
190 xbody(1,id1)=xmagnitude
197 elseif(ilabel.eq.2)
then 198 xbody(1,id1)=xmagnitude
199 xbody(2,id1)=bodyf(1)
200 xbody(3,id1)=bodyf(2)
201 xbody(4,id1)=bodyf(3)
subroutine cident(x, px, n, id)
Definition: cident.f:26