Skip to content

Commit f7e9dac

Browse files
committed
More tune_parameters short circuit
1 parent 8c11bd9 commit f7e9dac

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • lib/BoundaryValueDiffEqFIRK/src

lib/BoundaryValueDiffEqFIRK/src/firk.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ function init_nested(
126126
end
127127
diffcache = __cache_trait(alg.jac_alg)
128128
tune_parameters = haskey(prob.kwargs, :tune_parameters)
129+
if tune_parameters
130+
prob.p isa SciMLBase.NullParameters &&
131+
throw(ArgumentError("`tune_parameters` is true but `prob.p` is not set."))
132+
end
133+
129134
constraint = (!isnothing(prob.f.inequality)) ||
130135
(!isnothing(prob.f.equality)) ||
131136
(!isnothing(prob.lb)) ||

0 commit comments

Comments
 (0)