File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -918,24 +918,21 @@ function generate_vector_rootfinding_callback(
918918 initialize = nothing
919919 if has_index_cache (sys) && (ic = get_index_cache (sys)) != = nothing
920920 initialize = handle_optional_setup_fn (
921- map (
922- (cb, fn) -> begin
923- if (save_idxs = get (ic. callback_to_clocks, cb, nothing )) != = nothing
924- let save_idxs = save_idxs
925- custom_init = fn. initialize
926- (i) -> begin
927- isnothing (custom_init) && custom_init (i)
928- for idx in save_idxs
929- SciMLBase. save_discretes! (i, idx)
930- end
921+ map (cbs, affect_functions) do cb, fn
922+ if (save_idxs = get (ic. callback_to_clocks, cb, nothing )) != = nothing
923+ let save_idxs = save_idxs
924+ custom_init = fn. initialize
925+ (i) -> begin
926+ isnothing (custom_init) && custom_init (i)
927+ for idx in save_idxs
928+ SciMLBase. save_discretes! (i, idx)
931929 end
932930 end
933- else
934- fn. initialize
935931 end
936- end ,
937- cbs,
938- affect_functions),
932+ else
933+ fn. initialize
934+ end
935+ end ,
939936 SciMLBase. INITIALIZE_DEFAULT)
940937
941938 else
You can’t perform that action at this time.
0 commit comments