Skip to content

Commit

Permalink
Amr: Add printing of simulation time (#3392)
Browse files Browse the repository at this point in the history
A very small PR to add the printing of simulation time in
`Amr::timeStep` (for `Amr::verbose > 0`).

Though the time is already printed out every coarse timestep
[here](https://github.com/AMReX-Codes/amrex/blob/9c256b12b89f86b30fe1a6f03dd79db351d56fb3/Src/Amr/AMReX_Amr.cpp#L2174),
with deep AMR hierarchies, it can be a long amount of [wall]time between
these printouts, hence I would find it useful to see the current
simulation time more often.
  • Loading branch information
mirenradia committed Jul 1, 2023
1 parent 97724eb commit 22a1a3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/Amr/AMReX_Amr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,8 @@ Amr::timeStep (int level,
if (verbose > 0)
{
amrex::Print() << "[Level " << level << " step " << level_steps[level]+1 << "] "
<< "ADVANCE with dt = " << dt_level[level] << "\n";
<< "ADVANCE at time " << time
<< " with dt = " << dt_level[level] << "\n";
}

Real dt_new = amr_level[level]->advance(time,dt_level[level],iteration,niter);
Expand Down

0 comments on commit 22a1a3a

Please sign in to comment.