@@ -102,20 +102,20 @@ function _savevalues!(integrator, force_save, reduce_size)::Tuple{Bool, Bool}
102
102
[k[integrator. opts. save_idxs] for k in integrator. k],
103
103
false )
104
104
end
105
- if integrator. alg isa DAEAlgorithm
106
- if integrator. opts. save_idxs === nothing
107
- copyat_or_push! (integrator. sol. du, integrator. saveiter, integrator. du)
108
- else
109
- copyat_or_push! (integrator. sol. du, integrator. saveiter,
110
- integrator. du[integrator. opts. save_idxs], false )
111
- end
112
- end
113
105
end
114
106
end
115
107
if integrator. alg isa OrdinaryDiffEqCompositeAlgorithm
116
108
copyat_or_push! (integrator. sol. alg_choice, integrator. saveiter,
117
109
integrator. cache. current)
118
110
end
111
+ if integrator. opts. save_du
112
+ if integrator. opts. save_idxs === nothing
113
+ copyat_or_push! (integrator. sol. du, integrator. saveiter, integrator (integrator. t, Val{1 }))
114
+ else
115
+ copyat_or_push! (integrator. sol. du, integrator. saveiter,
116
+ integrator (integrator. t, Val{1 }, idxs= integrator. opts. save_idxs), false )
117
+ end
118
+ end
119
119
end
120
120
end
121
121
if force_save || (integrator. opts. save_everystep &&
@@ -142,20 +142,20 @@ function _savevalues!(integrator, force_save, reduce_size)::Tuple{Bool, Bool}
142
142
[k[integrator. opts. save_idxs] for k in integrator. k],
143
143
false )
144
144
end
145
- if integrator. alg isa DAEAlgorithm
146
- if integrator. opts. save_idxs === nothing
147
- copyat_or_push! (integrator. sol. du, integrator. saveiter, integrator. du)
148
- else
149
- copyat_or_push! (integrator. sol. du, integrator. saveiter,
150
- integrator. du[integrator. opts. save_idxs], false )
151
- end
152
- end
153
145
end
154
146
end
155
147
if integrator. alg isa OrdinaryDiffEqCompositeAlgorithm
156
148
copyat_or_push! (integrator. sol. alg_choice, integrator. saveiter,
157
149
integrator. cache. current)
158
150
end
151
+ if integrator. opts. save_du
152
+ if integrator. opts. save_idxs === nothing
153
+ copyat_or_push! (integrator. sol. du, integrator. saveiter, integrator (integrator. t, Val{1 }))
154
+ else
155
+ copyat_or_push! (integrator. sol. du, integrator. saveiter,
156
+ integrator (integrator. t, Val{1 }, idxs= integrator. opts. save_idxs), false )
157
+ end
158
+ end
159
159
end
160
160
reduce_size && resize! (integrator. k, integrator. kshortsize)
161
161
return saved, savedexactly
0 commit comments