Skip to content

Initialize dt when restarting from plt#623

Merged
baperry2 merged 3 commits intoAMReX-Combustion:developmentfrom
d-montgomery:set-dt-from-plt
Feb 12, 2026
Merged

Initialize dt when restarting from plt#623
baperry2 merged 3 commits intoAMReX-Combustion:developmentfrom
d-montgomery:set-dt-from-plt

Conversation

@d-montgomery
Copy link
Contributor

@d-montgomery d-montgomery commented Feb 12, 2026

This fixes an error when restarting from plt files with peleLM.initDataPlt_reset_time = 0. m_dt and m_prev_dt were not being initialized causing the following error:

Estimated dt -1.1 is below allowed dt_min 1e-12: the simulation will stop !

This PR sets m_dt and m_prev_dt based on the fixed time step in the input file. If amr.cfl is specified by the user, m_dt and m_prev_dt are set to large values which are then updated during the CFL calculation.

Tested with amr.dt_shrink and amr.dt_change_max
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an initialization bug when restarting from plotfiles with peleLM.initDataPlt_reset_time = 0. The issue occurred because m_dt and m_prev_dt were not initialized when reading from plotfiles (which don't contain timestep information), causing them to remain at their default value of -1.0. This led to the error "Estimated dt -1.1 is below allowed dt_min" during the first timestep calculation.

Changes:

  • Initialize m_dt and m_prev_dt when restarting from plotfiles with m_do_reset_time = 0
  • Set both to m_fixed_dt if using fixed timestepping
  • Set both to AMREX_REAL_MAX if using CFL-based timestepping

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@baperry2 baperry2 merged commit a9d4a54 into AMReX-Combustion:development Feb 12, 2026
34 checks passed
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.

2 participants