Skip to content

Commit 97c53cb

Browse files
Improve the update_coefficients of ScalarOperator
1 parent c613fe3 commit 97c53cb

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)