@@ -10,6 +10,7 @@ using LieGroups: AbstractLieGroup, GroupAction, base_lie_group, diff_group_apply
1010using Manifolds
1111using ManifoldsBase: retract_fused, retract_fused!, base_manifold
1212
13+ using Random
1314
1415using Accessors: @set
1516
@@ -256,6 +257,15 @@ function SciMLBase.__init(
256257 allow_extrapolation = alg_extrapolates (alg),
257258 initialize_integrator = true ,
258259 initializealg = DefaultInit (),
260+ # some new things
261+ save_noise = false ,
262+ delta = nothing ,
263+ W = nothing ,
264+ P = nothing ,
265+ sqdt = nothing ,
266+ noise = nothing ,
267+ c = nothing ,
268+ rate_constants = nothing ,
259269 kwargs... ,
260270 ) where {recompile_flag}
261271 isdae = false
@@ -442,9 +452,16 @@ function SciMLBase.__init(
442452 internalnorm = ODE_DEFAULT_NORM
443453 save_discretes = true
444454
455+ controller_cache = OrdinaryDiffEqCore. setup_controller_cache (_alg, nothing , controller)
456+ _tstops_cache = tstops
457+
458+ verbose_spec = OrdinaryDiffEqCore. _process_verbose_param (verbose)
459+
445460 opts = DEOptions{
446461 typeof (abstol_internal), typeof (reltol_internal),
447- QT, tType, typeof (controller),
462+ QT, tType,
463+ # typeof(controller),
464+ typeof (controller_cache),
448465 typeof (internalnorm), typeof (internalopnorm),
449466 typeof (save_end_user),
450467 typeof (callbacks_internal),
@@ -453,40 +470,47 @@ function SciMLBase.__init(
453470 typeof (tstops_internal),
454471 typeof (d_discontinuities_internal), typeof (userdata),
455472 typeof (save_idxs),
456- typeof (maxiters), typeof (tstops),
457- typeof (saveat), typeof (d_discontinuities),
473+ typeof (maxiters), typeof (_tstops_cache),
474+ typeof (saveat), typeof (d_discontinuities), typeof (verbose_spec),
475+ typeof (delta),
458476 }(
459477 maxiters, save_everystep,
460478 adaptive, abstol_internal,
461479 reltol_internal,
462- QT (gamma), QT (qmax),
480+ # TODO vvv remove this block as these are controller and not integrator parameters vvv
481+ QT (gamma),
482+ QT (qmax),
463483 QT (qmin),
464484 QT (qsteady_max),
465485 QT (qsteady_min),
466486 QT (qoldinit),
487+ # TODO ^^^remove this block as these are controller and not integrator parameters ^^^
467488 QT (failfactor),
468489 tType (dtmax), tType (dtmin),
469- controller,
490+ # TODO vvv remove this vvv
491+ # controller,
492+ controller_cache,
493+ # TODO ^^^ remove this ^^^
470494 internalnorm,
471495 internalopnorm,
472496 save_idxs, tstops_internal,
473497 saveat_internal,
474498 d_discontinuities_internal,
475- tstops , saveat,
499+ _tstops_cache , saveat,
476500 d_discontinuities,
477501 userdata, progress,
478502 progress_steps,
479503 progress_name,
480504 progress_message,
481505 progress_id,
482506 timeseries_errors,
483- dense_errors, dense,
507+ dense_errors, delta, dense,
484508 save_on, save_start,
485- save_end, save_discretes, save_end_user,
509+ save_end, save_noise, save_discretes, save_end_user,
486510 callbacks_internal,
487511 isoutofdomain,
488512 unstable_check,
489- verbose , calck, force_dtmin,
513+ verbose_spec , calck, force_dtmin,
490514 advance_to_tstop,
491515 stop_at_next_tstop
492516 )
@@ -548,77 +572,49 @@ function SciMLBase.__init(
548572 # fsalfirst, fsallast = get_fsalfirstlast(cache, rate_prototype)
549573 fsalfirst, fsallast = allocate (rate_prototype), allocate (rate_prototype)
550574
575+ _rng = Random. default_rng ()
576+ _dt = dt
577+ next_step_tstop = false
578+ tstop_target = zero (t)
579+ reinitialize = true
580+
551581 integrator = ODEIntegrator{
552- typeof (_alg),
553- isinplace (prob),
554- uType,
555- typeof (du),
556- tType,
557- typeof (p),
558- typeof (eigen_est),
559- typeof (EEst),
560- QT,
561- typeof (tdir),
562- typeof (k),
563- SolType,
564- FType,
565- cacheType,
566- typeof (opts),
567- typeof (fsalfirst),
568- typeof (last_event_error),
569- typeof (callback_cache),
570- typeof (initializealg),
571- typeof (differential_vars),
582+ typeof (_alg), isinplace (prob), uType, typeof (du),
583+ tType, typeof (p),
584+ typeof (eigen_est), EEstT,
585+ QT, typeof (tdir), typeof (k), SolType,
586+ FType, cacheType,
587+ typeof (opts), typeof (fsalfirst),
588+ typeof (last_event_error), typeof (callback_cache),
589+ typeof (initializealg), typeof (differential_vars),
590+ typeof (controller_cache), typeof (_rng),
591+ typeof (W), typeof (P), typeof (sqdt),
592+ typeof (noise), typeof (c), typeof (rate_constants),
572593 }(
573- sol,
574- u,
575- du,
576- k,
577- t,
578- tType (dt),
579- f,
580- p,
581- uprev,
582- uprev2,
583- duprev,
584- tprev,
585- _alg,
586- dtcache,
587- dtchangeable,
588- dtpropose,
589- tdir,
590- eigen_est,
591- EEst,
592- QT (qoldinit),
593- q11,
594- erracc,
595- dtacc,
594+ sol, u, du, k, t, tType (_dt), f, p,
595+ uprev, uprev2, duprev, tprev,
596+ _alg, dtcache, dtchangeable,
597+ dtpropose, tdir, eigen_est, EEst,
598+ # TODO vvv remove these
599+ QT (qoldinit), q11,
600+ erracc, dtacc,
601+ # TODO ^^^ remove these
602+ controller_cache,
596603 success_iter,
597- iter,
598- saveiter,
599- saveiter_dense,
600- cache,
604+ iter, saveiter, saveiter_dense, cache,
601605 callback_cache,
602- kshortsize,
603- force_stepfail,
606+ kshortsize, force_stepfail,
604607 last_stepfail,
605- just_hit_tstop,
606- do_error_check,
608+ just_hit_tstop, next_step_tstop, tstop_target, do_error_check,
607609 event_last_time,
608610 vector_event_last_time,
609- last_event_error,
610- accept_step,
611- isout,
612- reeval_fsal,
613- u_modified,
614- reinitiailize,
615- isdae,
616- opts,
617- stats,
618- initializealg,
619- differential_vars,
620- fsalfirst,
621- fsallast,
611+ last_event_error, accept_step,
612+ isout, reeval_fsal,
613+ u_modified, reinitialize, isdae,
614+ opts, stats, initializealg, differential_vars,
615+ fsalfirst, fsallast, _rng,
616+ W, P, sqdt,
617+ noise, c, rate_constants, QT (1 )
622618 )
623619
624620 if initialize_integrator
0 commit comments