diff --git a/BloubWorld/mergebloubs.f90 b/BloubWorld/mergebloubs.f90 index 4a63fa7..c230695 100644 --- a/BloubWorld/mergebloubs.f90 +++ b/BloubWorld/mergebloubs.f90 @@ -73,9 +73,17 @@ contains type(t_bloubs), intent(in) :: bla, blb type(t_bloubs), intent(out) :: blr + real :: va, vbb +!- +! XXX please insert here a static counter for the 'num' id +!- + blr%nick = "merged " blr%num = 0 ! ??? + va = bla%radius * bla%radius * bla%radius + vb = blb%radius * blb%radius * blb%radius + blr%px = (bla%px + blb%px) / 2.0 blr%py = (bla%py + blb%py) / 2.0 blr%pz = (bla%pz + blb%pz) / 2.0 @@ -84,8 +92,8 @@ contains blr%vy = (bla%vy + blb%vy) / 2.0 blr%vz = (bla%vz + blb%vz) / 2.0 - blr%radius = (bla%radius + blb%radius) - blr%age = max(bla%age, blb%age) + blr%radius = (va + vb) ** 0.33333333333 + blr%age = min(bla%age, blb%age) ! bring it to life ! blr%alive = .TRUE.