Skip to content

fix update timestep print message#6846

Open
JustinRayAngus wants to merge 2 commits intoBLAST-WarpX:developmentfrom
JustinRayAngus:update_dt_print
Open

fix update timestep print message#6846
JustinRayAngus wants to merge 2 commits intoBLAST-WarpX:developmentfrom
JustinRayAngus:update_dt_print

Conversation

@JustinRayAngus
Copy link
Copy Markdown
Contributor

@JustinRayAngus JustinRayAngus commented May 9, 2026

This PR fixes a print issue introduced in PR #6840. When ApplyDtLimiters() is called, the updated time step is printed using:
amrex::Print() << Utils::TextMsg::Info("updating timestep to dt = " + std::to_string(dt[0]));

I find that the print looks like:
--- INFO : updating timestep to dt = 0.000000.

This PR instead uses

std::ostringstream oss;
oss << "updating timestep to DT = " << std::scientific << std::setprecision(6) << dt[0];
amrex::Print() << Utils::TextMsg::Info(oss.str());

Which looks like
--- INFO : updating timestep to DT = 1.000000e-12

It was also commented in PR #6840 that ApplyDtLimiters() is not applied at step 0, resulting in the time step set by the CFL for light waves. This PR also adds the call to ApplyDtLimiters() at step = 0.

@JustinRayAngus JustinRayAngus requested a review from dpgrote May 9, 2026 21:22
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.

1 participant