Skip to content

Commit de022fb

Browse files
Merge pull request #256 from albertomercurio/patch-1
Improve the update_coefficients of ScalarOperator
2 parents c613fe3 + 97c53cb commit de022fb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/scalar.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,8 @@ function update_coefficients!(L::ScalarOperator, u, p, t; kwargs...)
194194
nothing
195195
end
196196

197-
function update_coefficients(L::ScalarOperator, u, p, t; kwargs...)
198-
update_coefficients!(L, u, p, t; kwargs...)
199-
L
197+
function SciMLOperators.update_coefficients(L::ScalarOperator, u, p, t; kwargs...)
198+
return ScalarOperator(L.update_func(L.val, u, p, t; kwargs...), L.update_func)
200199
end
201200

202201
"""

0 commit comments

Comments
 (0)