Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/SCCNonlinearSolve/src/SCCNonlinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function iteratively_build_sols(alg, sols, (prob, explicitfun), args...; kwargs.
SymbolicIndexingInterface.parameter_values(prob), sols)

_sol = if prob isa SciMLBase.LinearProblem
sol = SciMLBase.solve(prob, alg.linalg; kwargs...)
A = prob.A
b = prob.b
# `remake` to recalculate `A` and `b` based on updated parameters from `explicitfun`.
# Pass `A` and `b` to avoid unnecessarily copying them.
sol = SciMLBase.solve(SciMLBase.remake(prob; A, b), alg.linalg; kwargs...)
SciMLBase.build_linear_solution(
alg.linalg, sol.u, nothing, nothing, retcode = sol.retcode)
else
Expand Down
Loading