diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index 05a5b45cf..5f55578ed 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -190,7 +190,8 @@ subroutine symba_discard_conserve_energy_and_momentum(pl, nbody_system, param, i ! Update rotation of central body to by consistent with its angular momentum if (param%lrotation) then drot0(:) = cb%L0(:)/ (cb%Ip(3) * cb%mass * cb%radius**2) - drot1(:) = cb%dL(:) / (cb%Ip(3) * cb%mass * cb%radius**2) + drot1(:) = cb%dL(:) / (cb%Ip(3) * cb%mass * cb%radius**2) + cb%rot(:) = drot0(:) + drot1(:) ke_spin = ke_spin - 0.5_DP * cb%mass * cb%radius**2 * cb%Ip(3) * dot_product(cb%rot(:), cb%rot(:)) end if cb%rb(:) = xcom(:)