@@ -59,13 +59,13 @@ class DOP853Integrator : public AdaptiveIntegrator<S, T> {
5959
6060 // Fortran default parameters (do not change unless you know what you are doing)
6161 static constexpr time_type fortran_safety = static_cast <time_type>(0.9 ); // SAFE
62- static constexpr time_type fortran_fac1 = static_cast <time_type>(0.333 ); // FAC1
63- static constexpr time_type fortran_fac2 = static_cast <time_type>(6.0 ); // FAC2
64- static constexpr time_type fortran_beta = static_cast <time_type>(0.0 ); // BETA
65- static constexpr time_type fortran_dt_max = static_cast <time_type>(1e100 ); // HMAX
66- static constexpr time_type fortran_dt_min = static_cast <time_type>(1e-16 ); // practical min
67- static constexpr int fortran_nmax = 100000 ; // NMAX
68- static constexpr int fortran_nstiff = 1000 ; // NSTIFF
62+ static constexpr time_type fortran_fac1 = static_cast <time_type>(0.333 ); // FAC1 (min step size factor)
63+ static constexpr time_type fortran_fac2 = static_cast <time_type>(6.0 ); // FAC2 (max step size factor)
64+ static constexpr time_type fortran_beta = static_cast <time_type>(0.0 ); // BETA (step size stabilization)
65+ static constexpr time_type fortran_dt_max = static_cast <time_type>(1e100 ); // HMAX (max step size)
66+ static constexpr time_type fortran_dt_min = static_cast <time_type>(1e-16 ); // practical min (not in Fortran, but practical)
67+ static constexpr int fortran_nmax = 100000 ; // NMAX (max steps)
68+ static constexpr int fortran_nstiff = 1000 ; // NSTIFF (stiffness test interval)
6969
7070 // Internal state (Fortran default values)
7171 time_type safety_factor_ = fortran_safety;
@@ -87,28 +87,6 @@ class DOP853Integrator : public AdaptiveIntegrator<S, T> {
8787 int nrejct_ = 0 ;
8888 int nfcn_ = 0 ;
8989
90- // Step size control parameters (modern C++ style, with defaults)
91- time_type safety_factor_ = static_cast <time_type>(0.9 ); // Fortran SAFE
92- time_type fac1_ = static_cast <time_type>(0.333 ); // Fortran FAC1 (min step size factor)
93- time_type fac2_ = static_cast <time_type>(6.0 ); // Fortran FAC2 (max step size factor)
94- time_type beta_ = static_cast <time_type>(0.0 ); // Fortran BETA (step size stabilization)
95- time_type dt_max_ = static_cast <time_type>(1e100 ); // Fortran HMAX (max step size)
96- time_type dt_min_ = static_cast <time_type>(1e-16 ); // Min step size (not in Fortran, but practical)
97- int nmax_ = 100000 ; // Fortran NMAX (max steps)
98- int nstiff_ = 1000 ; // Fortran NSTIFF (stiffness test interval)
99-
100- // Stiffness detection state
101- int iastiff_ = 0 ;
102- int nonsti_ = 0 ;
103- time_type hlamb_ = 0 ;
104- time_type facold_ = static_cast <time_type>(1e-4 );
105-
106- // For statistics (optional)
107- int nstep_ = 0 ;
108- int naccpt_ = 0 ;
109- int nrejct_ = 0 ;
110- int nfcn_ = 0 ;
111-
11290private:
11391 // Compute a good initial step size (HINIT from Fortran)
11492 time_type compute_initial_step (const state_type& y, time_type t, const system_function& sys, time_type t_end) const {
0 commit comments