Skip to content

Commit

Permalink
A bit more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristopherson committed Feb 28, 2024
1 parent 7031790 commit 5dfab86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/levenberg_marquardt.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
submodule (fstats) levenberg_marquardt
! REFERENCES:
! 1. https://people.duke.edu/~hpgavin/ExperimentalSystems/lm.pdf
use linalg, only : mtx_inverse, lu_factor, mtx_mult
use linalg, only : mtx_inverse, lu_factor, mtx_mult, solve_lu, &
diag_mtx_mult, rank1_update
use fstats_errors
implicit none
contains
Expand Down Expand Up @@ -453,7 +454,7 @@ subroutine broyden_update(pOld, yOld, jac, p, y, dp, dy)
dp = p - pOld
h2 = dot_product(dp, dp)
dy = y - yOld - matmul(jac, dp)
call recip_mult_array(h2, dy) ! compute dy / h2
dy = dy / h2
call rank1_update(1.0d0, dy, dp, jac)
end subroutine

Expand Down

0 comments on commit 5dfab86

Please sign in to comment.