lanl / phoebus

Phifty One Ergs Blows Up A Star
BSD 3-Clause "New" or "Revised" License
46 stars 2 forks source link

Add timestep controls to the monopole gravity solver #91

Closed Yurlungur closed 2 years ago

Yurlungur commented 2 years ago

PR Summary

As we discussed, we currently use lagged variables (i.e., from one subcycle behind) to source the monopole solver. We decided that a totally un-lagged procedure is, at the moment, not desirable. These changes are intended to lend a bit more confidence to our current approach.

I add two features that should add confidence:

  1. I add a time step control that demands the time step be shorter than dtfac * alpha/(dalpha/dt), which provides an approximate characteristic time scale for metric evolution. There's no stability criterion here... But presumably if we are taking time steps larger than the metric evolution time scale, then lagging our variables is certainly wrong.
  2. I add a new task to the task list for the monopole solver that tries to estimate how good first-order operator splitting is. It compares a finite differences (dalpha/dt) to the analytic one computed by the solver and checks that these two rates are relatively close. It optionally spits out a warning if they are not.

Interested to hear what people think.

PR Checklist

Yurlungur commented 2 years ago

Now tested and seems to behave itself.

Yurlungur commented 2 years ago

If no one reviews this by the end of day today, I will merge it by fiat.

Yurlungur commented 2 years ago

Thanks, @lroberts36 ! I addressed all your comments and will go ahead and merge now.

Yurlungur commented 2 years ago

or as soon as tests pass