encore une étape pleine de bugs ?
This commit is contained in:
@@ -24,7 +24,7 @@ program movebloubs
|
||||
call getarg(2, outfile)
|
||||
|
||||
write (0, '(A)') &
|
||||
"*** moving bloubs from "//trim(infile)//" to "//trim(outfile)
|
||||
"### moving bloubs from "//trim(infile)//" to "//trim(outfile)
|
||||
|
||||
open(newunit=inu, &
|
||||
file=trim(infile), form='unformatted', &
|
||||
@@ -56,17 +56,16 @@ program movebloubs
|
||||
endif
|
||||
|
||||
! moving, morphing and boundingboxing
|
||||
call move_bloub (bloub, 0.185)
|
||||
call bound_a_blob (bloub)
|
||||
if (bloub%radius .GT. 0.0155) then
|
||||
bloub%radius = bloub%radius * 0.9970
|
||||
call move_bloub (bloub, 0.185)
|
||||
call bound_a_bloub (bloub)
|
||||
if (bloub%radius .GT. 0.0238) then
|
||||
bloub%radius = bloub%radius * 0.996
|
||||
endif
|
||||
|
||||
call green_soylent (bloub)
|
||||
if (.NOT. bloub%alive) then
|
||||
! write(0, '(A)') " KILL!"
|
||||
killed = killed + 1
|
||||
! cycle ! ???
|
||||
endif
|
||||
|
||||
! calcul du barycentre
|
||||
@@ -74,11 +73,13 @@ program movebloubs
|
||||
by = by + dble(bloub%py)
|
||||
bz = bz + dble(bloub%pz)
|
||||
|
||||
write(outu, iostat=errcode) bloub ! no error control ?
|
||||
if (0 .ne. errcode) then
|
||||
STOP " : WRITE ERROR TO " // trim(outfile)
|
||||
if (bloub%alive) then
|
||||
write(outu, iostat=errcode) bloub
|
||||
if (0 .ne. errcode) then
|
||||
STOP " : WRITE ERROR TO " // trim(outfile)
|
||||
endif
|
||||
compteur = compteur + 1
|
||||
endif
|
||||
compteur = compteur + 1
|
||||
|
||||
enddo ! end of main loop
|
||||
|
||||
@@ -88,15 +89,15 @@ program movebloubs
|
||||
|
||||
! insert some fancy conditional here
|
||||
if (compteur .LT. 200) then
|
||||
call add_more_bloubs(outu, 5, 0.1333)
|
||||
call add_more_bloubs(outu, 4, 0.1056)
|
||||
endif
|
||||
|
||||
! insert some very fancy conditional here
|
||||
if (compteur .LT. 3000) then
|
||||
if (compteur .LT. 800) then
|
||||
rnd = rand()
|
||||
write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
|
||||
if (rnd .LT. 0.0455) then
|
||||
call add_more_bloubs(outu, 24, 0.0999)
|
||||
if (rnd .LT. 0.0604) then
|
||||
call add_more_bloubs(outu, 11, 0.099)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -120,7 +121,7 @@ contains
|
||||
type(t_bloubs) :: bloub
|
||||
integer :: foo, count
|
||||
|
||||
count = nbre+mod(irand(), 9)
|
||||
count = nbre+mod(irand(), 6)
|
||||
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
|
||||
|
||||
do foo=1, count
|
||||
|
||||
Reference in New Issue
Block a user