diff --git a/src/io/io.f90 b/src/io/io.f90 index 4aa3b88a3..23f64f26a 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -909,6 +909,13 @@ module subroutine io_read_cb_in(self, param) if (self%j2rp2 /= 0.0_DP) param%loblatecb = .true. if (param%rmin < 0.0) param%rmin = self%radius + + select type(cb => self) + class is (symba_cb) + cb%M0 = cb%mass + cb%R0 = cb%radius + cb%L0(:) = cb%Ip(3) * cb%mass * cb%radius**2 * cb%rot(:) + end select return diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index bf70f15dd..2bf7b2a90 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -92,7 +92,7 @@ subroutine symba_discard_conserve_mtm(pl, system, param, ipl, lescape_body) system%Mescape = system%Mescape + pl%mass(ipl) do i = 1, pl%nbody if (i == ipl) cycle - pe = pe - pl%mass(i) * pl%mass(ipl) / norm2(pl%xb(:, ipl) - pl%xb(:, i)) + pe = pe - pl%Gmass(i) * pl%mass(ipl) / norm2(pl%xb(:, ipl) - pl%xb(:, i)) end do Ltot(:) = 0.0_DP