SAIntegrator: Add getLastStepSize() method to RKF45Integrator. #1114

This commit is contained in:
Penn, John M 047828115 2021-02-24 22:38:35 -06:00
parent 320ff5915a
commit e696254bc5
2 changed files with 4 additions and 0 deletions

View File

@ -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);
};

View File

@ -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];