diff --git a/trick_source/trick_utils/SAIntegrator/include/SAIntegrator.hh b/trick_source/trick_utils/SAIntegrator/include/SAIntegrator.hh index 7ff7723d..17415c06 100644 --- a/trick_source/trick_utils/SAIntegrator/include/SAIntegrator.hh +++ b/trick_source/trick_utils/SAIntegrator/include/SAIntegrator.hh @@ -164,6 +164,7 @@ namespace SA { void step(); // Returns the next suggested step-size. double adaptive_step( double h); + double getLastStepSize(); friend std::ostream& operator<<(std::ostream& os, const SA::RKF45Integrator& I); }; diff --git a/trick_source/trick_utils/SAIntegrator/src/SAIntegrator.cpp b/trick_source/trick_utils/SAIntegrator/src/SAIntegrator.cpp index d422e5e6..8f114b68 100644 --- a/trick_source/trick_utils/SAIntegrator/src/SAIntegrator.cpp +++ b/trick_source/trick_utils/SAIntegrator/src/SAIntegrator.cpp @@ -614,6 +614,9 @@ void SA::RKF45Integrator::advanceIndyVar(double h) { void SA::RKF45Integrator::step() { adaptive_step( next_h ); } + +double SA::RKF45Integrator::getLastStepSize() {return last_h;} + double SA::RKF45Integrator::adaptive_step(double h) { double wstate[5][state_size]; double derivs[6][state_size];