Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Improved convergence with skewed objective function that weights excess energy more than not enough (helps keep it from finding v_r~0, which has a flat enough  gradient to fool the minimizer).
  • Loading branch information
daminton committed May 18, 2021
1 parent c48d959 commit c1c3a83
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,12 @@ function ke_objective_function(v_r_mag, v_r_unit, v_t_mag, v_t_unit, x_frag, m_f
v_shift(:, i) = v_shift(:, i) + v_t_mag(i) * v_t_unit(:, i) + vcom(:)
fval = fval + 0.5_DP * m_frag(i) * dot_product(v_shift(:, i), v_shift(:, i))
end do
fval = fval**4
if (fval < 0.0_DP) then
fval = fval**8
else
fval = fval**2
end if


return

Expand Down

0 comments on commit c1c3a83

Please sign in to comment.