Skip to content

Commit

Permalink
fix Newton method for singular Jacobians
Browse files Browse the repository at this point in the history
  • Loading branch information
gwater committed Apr 26, 2020
1 parent 1f5736e commit 49ded71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/contractors.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using LinearAlgebra

export Contractor
export Bisection, Newton, Krawczyk

Expand All @@ -22,7 +24,9 @@ Multi-variable Newton operator.
function 𝒩(f::Function, jacobian::Function, X::IntervalBox, α) # multidimensional Newton operator
m = Interval.(mid(X, α))
J = jacobian(X)

if contains_zero(det(J))
return X
end
return IntervalBox(m .- (J \ f(m)))
end

Expand Down

0 comments on commit 49ded71

Please sign in to comment.