Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 723c667

Browse files
Format .jl files
1 parent 283ca63 commit 723c667

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/broyden.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::Broyden, args...;
6363
Δxₙ = xₙ - xₙ₋₁
6464
Δfₙ = fₙ - fₙ₋₁
6565
J⁻¹Δfₙ = _restructure(Δfₙ, J⁻¹ * _vec(Δfₙ))
66-
J⁻¹ += _restructure(J⁻¹, ((_vec(Δxₙ) .- _vec(J⁻¹Δfₙ)) ./ (_vec(Δxₙ)' * _vec(J⁻¹Δfₙ))) * (_vec(Δxₙ)' * J⁻¹))
66+
J⁻¹ += _restructure(J⁻¹,
67+
((_vec(Δxₙ) .- _vec(J⁻¹Δfₙ)) ./ (_vec(Δxₙ)' * _vec(J⁻¹Δfₙ))) *
68+
(_vec(Δxₙ)' * J⁻¹))
6769

6870
if termination_condition(fₙ, xₙ, xₙ₋₁, atol, rtol)
6971
return SciMLBase.build_solution(prob, alg, xₙ, fₙ; retcode = ReturnCode.Success)

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ end
8888
@inline _vec(v::AbstractVector) = v
8989

9090
@inline _restructure(y::Number, x::Number) = x
91-
@inline _restructure(y, x) = ArrayInterface.restructure(y,x)
91+
@inline _restructure(y, x) = ArrayInterface.restructure(y, x)

test/matrix_resizing_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using SimpleNonlinearSolve
22

33
ff(u, p) = u .* u .- p
4-
u0 = rand(2,2)
4+
u0 = rand(2, 2)
55
p = 2.0
66
vecprob = NonlinearProblem(ff, vec(u0), p)
77
prob = NonlinearProblem(ff, u0, p)

0 commit comments

Comments
 (0)