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

Commit

Permalink
Simplified objective function
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed May 25, 2021
1 parent 0b0b39d commit e88cde2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,7 @@ function ke_objective_function(v_r_mag, v_r_unit, v_t_mag, v_t_unit, m_frag, vco
fval = fval + 0.5_DP * m_frag(i) * dot_product(v_shift(:, i), v_shift(:, i))
end do
! The following ensures that fval = 0 is a local minimum, which is what the BFGS method is searching for
if (fval < 0.0_DP) then
fval = fval**2
else
fval = fval**2
end if
fval = fval**2

return

Expand Down

0 comments on commit e88cde2

Please sign in to comment.