We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d99e6d commit a9c3d38Copy full SHA for a9c3d38
1 file changed
src/ADNLPProblems/powellsg.jl
@@ -25,8 +25,9 @@ function powellsg(::Val{:nlp}; n::Int = default_nvar, type::Type{T} = Float64, k
25
end
26
27
function powellsg(::Val{:nls}; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T}
28
- (n % 4 == 0) || @warn("powellsg: number of variables adjusted to be a multiple of 4")
+ n_orig = n
29
n = 4 * max(1, div(n, 4))
30
+ @adjust_nvar_warn("powellsg", n_orig, n)
31
function F!(r, x; n = length(x))
32
@inbounds for j = 1:4:n
33
r[j] = x[j] + 10 * x[j + 1]
0 commit comments