adding MOARE bloubs !!!
This commit is contained in:
parent
dd3cbe5dff
commit
8b132496ea
@ -75,16 +75,13 @@ program movebloubs
|
||||
|
||||
enddo
|
||||
|
||||
if (add_new_bloub) then
|
||||
! and now, we inject a new bloub in the universe
|
||||
bloub%nick = 'newbie '
|
||||
bloub%alive = .TRUE.
|
||||
call random_pv(bloub)
|
||||
bloub%radius = 0.045
|
||||
bloub%seq = 0
|
||||
! ok, we have read all the bloubs in the input file
|
||||
|
||||
! insert some fancy conditional here
|
||||
if (add_new_bloub) then
|
||||
|
||||
call add_more_bloubs(outu, 8, 0.095)
|
||||
|
||||
call display_bloub (bloub, "new bloub")
|
||||
write(outu) bloub ! no error control ?
|
||||
endif
|
||||
|
||||
close(inu) ; close(outu)
|
||||
@ -98,5 +95,29 @@ program movebloubs
|
||||
bz = bz / dble(compteur)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user