adding MOARE bloubs !!!

This commit is contained in:
tth 2022-02-11 15:26:52 +01:00
parent dd3cbe5dff
commit 8b132496ea

View File

@ -75,16 +75,13 @@ program movebloubs
enddo enddo
if (add_new_bloub) then ! ok, we have read all the bloubs in the input file
! and now, we inject a new bloub in the universe
bloub%nick = 'newbie ' ! insert some fancy conditional here
bloub%alive = .TRUE. if (add_new_bloub) then
call random_pv(bloub)
bloub%radius = 0.045 call add_more_bloubs(outu, 8, 0.095)
bloub%seq = 0
call display_bloub (bloub, "new bloub")
write(outu) bloub ! no error control ?
endif endif
close(inu) ; close(outu) close(inu) ; close(outu)
@ -98,5 +95,29 @@ program movebloubs
bz = bz / dble(compteur) bz = bz / dble(compteur)
write (0, '(A,3(F12.6,3X))') "barycentre : ", bx, by, bz write (0, '(A,3(F12.6,3X))') "barycentre : ", bx, by, bz
! --------------------------------------------------------------
contains
end program subroutine add_more_bloubs(un, nbre, wtf)
integer, intent(in) :: un, nbre
real, intent(in) :: wtf
type(t_bloubs) :: bloub
integer :: foo
do foo=1, nbre
bloub%nick = 'newbie '
bloub%alive = .TRUE.
call random_pv(bloub)
bloub%radius = wtf
bloub%seq = foo
call display_bloub (bloub, "new bloub")
write(un) bloub ! no error control ?
enddo
end subroutine
! --------------------------------------------------------------
end program movebloubs