Skip to content

define upto_gradient for MeritObjective #36

@longemen3000

Description

@longemen3000

something like this?

function NLSolvers.upto_gradient(meritobj::NLSolvers.MeritObjective, ∇f, x)
    neq = meritobj.prob
    G = neq.R.F(∇f, x)
    F =  (norm(G)^2) / 2
    return F,G
end

with that, NLSolvers.solve(prob,x0,LineSearch(Newton(),HZAW())) seems to work
EDIT: no it doesn't. but at least it hits an error in HZAW instead:
MethodError: no method matching isfinite(::NamedTuple{(:ϕ, :Fx), Tuple{Float64, StaticArrays.MVector{2, Float64}}})

while !isfinite(φc) && iter <= maxiter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions