AdaptiveTimeStepping: Switch suggested time step to max of the previous taken substeps.
This commit is contained in:
parent
f38b76abe9
commit
a6f00b90ac
@ -191,12 +191,12 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// store last small time step for next reportStep
|
// store max of the small time step for next reportStep
|
||||||
last_timestep_ = substepTimer.suggestedAverage();
|
last_timestep_ = substepTimer.maxStepLength();
|
||||||
if( timestep_verbose_ )
|
if( timestep_verbose_ )
|
||||||
{
|
{
|
||||||
substepTimer.report( std::cout );
|
substepTimer.report( std::cout );
|
||||||
std::cout << "Last suggested step size = " << unit::convert::to( last_timestep_, unit::day ) << " (days)" << std::endl;
|
std::cout << "Suggested next step size = " << unit::convert::to( last_timestep_, unit::day ) << " (days)" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! std::isfinite( last_timestep_ ) ) { // check for NaN
|
if( ! std::isfinite( last_timestep_ ) ) { // check for NaN
|
||||||
|
Loading…
Reference in New Issue
Block a user