no milesatone reached...

This commit is contained in:
tth
2022-02-17 14:10:15 +01:00
parent bc54e20011
commit cfc8ea6b63
7 changed files with 37 additions and 20 deletions

View File

@@ -70,6 +70,11 @@ program mergebloubs
do ! infinite loop
print *, "============ PASS ", idx
if (idx .EQ. NB_MAX_BLOUBS) then
write(0, '(I8, A)') idx, " max number of bloubs reached"
exit
endif
! read the next bloub from input file
read (unit=inu, iostat=errcode) bloub
if (0 .ne. errcode) then
@@ -89,9 +94,7 @@ program mergebloubs
! call display_bloub(les_bloubs(i), "DEAD ? WTF ?")
cycle
endif
rval = distance_of_bloubs(les_bloubs(i), bloub)
if (rval .LT. (les_bloubs(i)%radius + bloub%radius)) then
print *, "contact : ", i, idx, rval
call merge_two_bloubs(les_bloubs(i), bloub, newbloub)
@@ -99,16 +102,21 @@ program mergebloubs
nbr_merge = nbr_merge + 1
merged = .TRUE.
endif
enddo
if (merged) then
! put new bloub in the list
les_bloubs(idx) = newbloub
bloub = newbloub
else
! put old bloub in the list
les_bloubs(idx) = bloub
endif
write(outu, iostat=errcode) bloub ! no error control ?
if (0 .ne. errcode) then
STOP " : WRITE ERROR TO " // trim(outfile)
endif
idx = idx + 1
! print *, "idx = ", idx