1. The Enzo Project
  2. Untitled project
  3. enzo-dev
  4. Pull requests

Pull requests

#254 Merged at 9f0ffc1
Repository
Deleted repository
Branch
week-of-code (48405f78c6be)
Repository
enzo-dev
Branch
week-of-code

Minor FLD solver update to skip linear solve when possible

Author
  1. Daniel Reynolds
Reviewers
Description

Updated gFLDSplit_Evolve() routine to skip the solve if possible (useful for reionization runs before stars are made).

Comments (10)

  1. Daniel Reynolds author

    Interesting! Actually it's not the dt, TimeUnits bit, since that happens at the end of the linear solve anyway. So if I skip the linear solve, I still need to scale the units back to their normalized values.

    Instead, it looks like in this test problem, the first few time steps meet the criteria for skipping the call to the HYPRE solver. Eventually, the species get enough out of equilibrium so that the solves kick in.

    So in the 'gold standard', on those first few steps I end up doing a trivial linear solve and adding roundoff-level values to the existing radiation field. In the updated solver I skip those initial solves, meaning that I do not add roundoff-level values anywhere until the physics warrants changing the solution. It seems that this slight difference results in "Output times" that differ in the 14th digit.

    The end result of this test is still an overall error (in comparison with the analytical solution) that is orders of magnitude more accurate than the tolerances. My recommendation is that we declare the new solver "successful", and just update the gold standard to reflect this changed digit.

    1. Sam Skillman

      Makes sense to me, and that sounds like a plan. I'll let this PR simmer for a day or so in case anyone wants to take a look, but I don't think this needs any extra review.