Skip to content

Commit 9589a1f

Browse files
feat: store args and kwargs in EmptySciMLFunction
1 parent e8a9f04 commit 9589a1f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/systems/problem_utils.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,16 @@ end
431431
$(TYPEDEF)
432432
433433
A simple utility meant to be used as the `constructor` passed to `process_SciMLProblem` in
434-
case constructing a SciMLFunction is not required.
434+
case constructing a SciMLFunction is not required. The arguments passed to it are available
435+
in the `args` field, and the keyword arguments in the `kwargs` field.
435436
"""
436-
struct EmptySciMLFunction end
437+
struct EmptySciMLFunction{A, K}
438+
args::A
439+
kwargs::K
440+
end
437441

438442
function EmptySciMLFunction(args...; kwargs...)
439-
return nothing
443+
return EmptySciMLFunction{typeof(args), typeof(kwargs)}(args, kwargs)
440444
end
441445

442446
"""

0 commit comments

Comments
 (0)