@@ -731,35 +731,6 @@ function Base.:(==)(a::MTKParameters, b::MTKParameters)
731
731
end )
732
732
end
733
733
734
- # to support linearize/linearization_function
735
- function jacobian_wrt_vars (pf:: F , p:: MTKParameters , input_idxs, chunk:: C ) where {F, C}
736
- tunable, _, _ = SciMLStructures. canonicalize (SciMLStructures. Tunable (), p)
737
- T = eltype (tunable)
738
- tag = ForwardDiff. Tag (pf, T)
739
- dualtype = ForwardDiff. Dual{typeof (tag), T, ForwardDiff. chunksize (chunk)}
740
- p_big = SciMLStructures. replace (SciMLStructures. Tunable (), p, dualtype .(tunable))
741
- p_closure = let pf = pf,
742
- input_idxs = input_idxs,
743
- p_big = p_big
744
-
745
- function (p_small_inner)
746
- for (i, val) in zip (input_idxs, p_small_inner)
747
- set_parameter! (p_big, val, i)
748
- end
749
- return if pf isa SciMLBase. ParamJacobianWrapper
750
- buffer = Array {dualtype} (undef, size (pf. u))
751
- pf (buffer, p_big)
752
- buffer
753
- else
754
- pf (p_big)
755
- end
756
- end
757
- end
758
- p_small = parameter_values .((p,), input_idxs)
759
- cfg = ForwardDiff. JacobianConfig (p_closure, p_small, chunk, tag)
760
- ForwardDiff. jacobian (p_closure, p_small, cfg, Val (false ))
761
- end
762
-
763
734
const MISSING_PARAMETERS_MESSAGE = """
764
735
Some parameters are missing from the variable map.
765
736
Please provide a value or default for the following variables:
0 commit comments