From 6d51ad394710ea136eaa714f8ffac1a1e584d3f1 Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 18 Mar 2022 22:08:08 +0100 Subject: [PATCH] non working code inside --- BloubWorld/mergebloubs.f90 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/BloubWorld/mergebloubs.f90 b/BloubWorld/mergebloubs.f90 index 8e295ff..1e16ce1 100644 --- a/BloubWorld/mergebloubs.f90 +++ b/BloubWorld/mergebloubs.f90 @@ -1,5 +1,9 @@ program mergebloubs + !-------------------------------------------! + ! THIS IS A BIG MESS OF BUGS ! + !-------------------------------------------! + use bloubspace implicit none @@ -21,7 +25,8 @@ program mergebloubs call getarg(1, infile) call getarg(2, outfile) - write(0, '(2A20, I8)') trim(infile), trim(outfile), NB_MAX_BLOUBS + write(0, '(A, 2A20, I8)') "*** mergebloubs ", & + trim(infile), trim(outfile), NB_MAX_BLOUBS ! --------------- allocate memory for the people @@ -61,6 +66,11 @@ program mergebloubs STOP " : ERR READING FIRST BLOUB" endif call display_bloub (bloub, "first bloub") + write(outu, iostat=errcode) bloub + if (0 .ne. errcode) then + STOP " : FIRST BLOUB, WRITE ERROR TO " // trim(outfile) + endif + les_bloubs(idx) = bloub idx = idx + 1 @@ -69,7 +79,7 @@ program mergebloubs do ! infinite loop - print *, "============ PASS ", idx + ! print *, "============ PASS ", idx if (idx .EQ. NB_MAX_BLOUBS) then write(0, '(I8, A)') idx, " max number of bloubs reached" exit @@ -112,7 +122,7 @@ program mergebloubs les_bloubs(idx) = bloub endif - write(outu, iostat=errcode) bloub ! no error control ? + write(outu, iostat=errcode) bloub if (0 .ne. errcode) then STOP " : WRITE ERROR TO " // trim(outfile) endif @@ -149,7 +159,7 @@ contains blr%vy = (bla%vy + blb%vy) / 2.0 blr%vz = (bla%vz + blb%vz) / 2.0 - blr%radius = (bla%radius + blb%radius) / 1.414 + blr%radius = (bla%radius + blb%radius) / 2.718 blr%age = min(bla%age, blb%age) ! bring it to life !