Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Use minimum positive value of competing max initial time steps. #3954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blattms
Copy link
Member

@blattms blattms commented Feb 27, 2024

This can happen if both TUNING and NEXTSTEP are used. In this case the smaller positive value should be used.

This can happen if both TUNING and NEXTSTEP are used. In this case the smaller
positive value should be used.
@blattms
Copy link
Member Author

blattms commented Feb 27, 2024

jenkins build this please

@blattms blattms requested a review from bska March 5, 2024 14:01
Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I only miss a test for the case when neither TUNING nor NEXTSTEP applies.

Comment on lines +401 to +412
/*** TIMESTEP 11 ***/
{
std::size_t timestep = 11;
BOOST_CHECK_CLOSE(schedule[timestep].max_next_tstep(true), 1.0 * Metric::Time, diff);
BOOST_CHECK_CLOSE(schedule[timestep].max_next_tstep(false), 1.0 * Metric::Time, diff);
}
/*** TIMESTEP 12 ***/
{
std::size_t timestep = 12;
BOOST_CHECK_CLOSE(schedule[timestep].max_next_tstep(true), 1.0 * Metric::Time, diff);
BOOST_CHECK_CLOSE(schedule[timestep].max_next_tstep(false), 2.0 * Metric::Time, diff);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good. Do you think you could add a test for the max_next_tstep() < 0 case as well–i.e., for when there is no NEXTSTEP and we do not enable TUNING?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants