We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SimpleHalley
StaticArray
SimpleHalley is type unstable when used with StaticArrays
StaticArrays
using SimpleNonlinearSolve, StaticArrays, Test julia> f_SA(u, p) = SA[u[1] * u[1] - p, u[2] * u[2] - p] julia> prob = NonlinearProblem(f_SA, SA[1.0, 1.0], 2.0) julia> @inferred solve(prob, SimpleHalley()) ERROR: return type SciMLBase.NonlinearSolution{Float64, 1, SVector{2, Float64}, SVector{2, Float64}, NonlinearSolveBase.ImmutableNonlinearProblem{SVector{2, Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(f_SA), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, SciMLBase.StandardNonlinearProblem}, SimpleHalley{AutoForwardDiff{nothing, Nothing}}, Nothing, Nothing, Nothing, Nothing} does not match inferred return type SciMLBase.NonlinearSolution{_A, _B, _C, _D, NonlinearSolveBase.ImmutableNonlinearProblem{SVector{2, Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(f_SA), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, SciMLBase.StandardNonlinearProblem}, SimpleHalley{AutoForwardDiff{nothing, Nothing}}, Nothing, Nothing, Nothing, Nothing} where {_A, _B, _C, _D}
which is caused by instability in the hessian computation
julia> @inferred SimpleNonlinearSolve.Utils.compute_jacobian_and_hessian(alg.autodiff, prob, prob.f(prob.u0, prob.p), prob.u0) ERROR: return type Tuple{SVector{2, Float64}, SMatrix{2, 2, Float64, 4}, SMatrix{4, 2, Float64, 8}} does not match inferred return type Tuple{SVector{2, Float64}, SMatrix{2, 2, Float64, 4}, Any}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SimpleHalley
is type unstable when used withStaticArrays
which is caused by instability in the hessian computation
The text was updated successfully, but these errors were encountered: