Skip to content

Commit 75e813e

Browse files
RomeoVclaude
andcommitted
Fix additional internalnorm templating for trimming compatibility
Apply consistent `internalnorm::IN` templating to PolyAlgorithm and GeneralizedFirstOrder __init functions to prevent trimming errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ee86a52 commit 75e813e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/NonlinearSolveBase/src/polyalg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ end
117117
function SciMLBase.__init(
118118
prob::AbstractNonlinearProblem, alg::NonlinearSolvePolyAlgorithm, args...;
119119
stats = NLStats(0, 0, 0, 0, 0), maxtime = nothing, maxiters = 1000,
120-
internalnorm = L2_NORM, alias_u0 = false, verbose = true,
120+
internalnorm::IN = L2_NORM, alias_u0 = false, verbose = true,
121121
initializealg = NonlinearSolveDefaultInit(), kwargs...
122-
)
122+
) where {IN}
123123
if alias_u0 && !ArrayInterface.ismutable(prob.u0)
124124
verbose && @warn "`alias_u0` has been set to `true`, but `u0` is \
125125
immutable (checked using `ArrayInterface.ismutable`)."

lib/NonlinearSolveFirstOrder/src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ function SciMLBase.__init(
124124
prob::AbstractNonlinearProblem, alg::GeneralizedFirstOrderAlgorithm, args...;
125125
stats = NLStats(0, 0, 0, 0, 0), alias_u0 = false, maxiters = 1000,
126126
abstol = nothing, reltol = nothing, maxtime = nothing,
127-
termination_condition = nothing, internalnorm::F = L2_NORM,
127+
termination_condition = nothing, internalnorm::IN = L2_NORM,
128128
linsolve_kwargs = (;), initializealg = NonlinearSolveBase.NonlinearSolveDefaultInit(), kwargs...
129-
) where {F}
129+
) where {IN}
130130
@set! alg.autodiff = NonlinearSolveBase.select_jacobian_autodiff(prob, alg.autodiff)
131131
provided_jvp_autodiff = alg.jvp_autodiff !== nothing
132132
@set! alg.jvp_autodiff = if !provided_jvp_autodiff && alg.autodiff !== nothing &&

0 commit comments

Comments
 (0)