Using BoundaryValueDiffEqFIRK: what is the format for solution derivative in bc! function?

I’m trying to use BVProblem with solver RadauIIa5.
In the boundary condition function called by the solver,
I need to refer to the first derivative of the solution.
I can’t find an acceptable form for this derivative

In a different situation using ODEProblem with solver Vern9, this form is acceptable:
sol(tx, Val{1}; idxs=1)

But it is rejected by BVProblem with solver RadauIIa5:

ERROR: MethodError: no method matching (::BoundaryValueDiffEqCore.EvalSol{BoundaryValueDiffEqFIRK.FIRKCacheExpand{…}, Vector{…}, Vector{…}})(::Float64, ::Type{Val{…}}; idxs::Int64)
 .
 .
 .
Closest candidates are:
  (::BoundaryValueDiffEqCore.EvalSol{C})(::Number) where C<:BoundaryValueDiffEqFIRK.FIRKCacheExpand got unsupported keyword argument "idxs"
   @ BoundaryValueDiffEqFIRK ~/.julia/packages/BoundaryValueDiffEqFIRK/ddek7/src/interpolation.jl:134

Stacktrace:
  [1] bcond!(resid::Vector{…}, sol::BoundaryValueDiffEqCore.EvalSol{…}, par::Tuple{…}, r::Vector{…})
    @ Main ~/Applications/Julia/RealisticSeismology-main/src/RealMod/src/shtar.jl:59
  [2] eval_bc_residual!(resid::Vector{…}, ::SciMLBase.StandardBVProblem, bc!::typeof(bcond!), sol::BoundaryValueDiffEqCore.EvalSol{…}, p::Tuple{…}, t::Vector{…})
 .
 .
 .

I also tried various other forms with no success.

Please advise.

thanks

It looks like that dispatch is just missing. Open an issue.

Could that dispatch be missing because we’re supposed to use [DiffResults.derivative](https://github.com/JuliaDiff/DiffResults.jl/blob/master/docs/src/index.md)
because FIRK provides the in-solution vectors as type ForwardDiff.Dual (again with apparently no warning about this in the documentation) ?
(If so, I would have expected this to be no surprise to you, Chris! :wink:
Andy

No, the analytical solution to the derivative should be implemented but it’s not in this case and it’s missing a better error message.

Since this issue now may be closely related to difficulty using only the “0th derivative” of the in-solution vector, let me add that to this discourse.
I get this error…

The type `Float64` exists, but no method is defined for this combination of argument types when trying to construct it.
`` 
in this situation (without trying to reference Val{1} at this time) …

function f!(dy_dr, y::AbstractVector{<:AbstractFloat}, param, t)

Also doesn’t work without “<:”

[µ, ν, p] = y # Doesn’t work

µ = y[1]
ν = y[2]
p = y[3]     #  Works so far… 
xx = AnyFunc(p)    # This throws the error 
I was trying to apply the solution provided in [nice discourse 41905](https://discourse.julialang.org/t/error-with-forwarddiff-no-method-matching-float64/41905), which had only one equation, while I have three.  But now I'm planning to desperately resort to ```DiffResults.value```.  

An aside — I'm surprised that this solver RadauIIa5 with BVPropblem is providing y as a vector of 3 y values and the t value, all not vector's  Do I have to do something to allow a vector t chunk, which would seem more appropriate for a fully implicit solver providing ForwardDiff.Dual?  Or maybe that will come later in the solution process?  
We hapless clients need to know when we have to code with broadcast to cope with that.  

Thanks
Andy

I’m sorry, my last post doesn’t show the first line that I know that I pasted, so this time, I’ll start with a blank line:


ERROR: MethodError: no method matching Float64(::ForwardDiff.Dual{ForwardDiff.Tag{BoundaryValueDiffEqCore.__Fix3{…}, Float64}, Float64, 10})
The type `Float64` exists, but no method is defined for this combination of argument types when trying to construct it.

Such an error first appeared when I was starting with only:

function f!(dy_dr, y, param, t)