Minor FLD solver update to skip linear solve when possible

#254 Merged at 9f0ffc1
Deleted repository
week-of-code (48405f78c6be)
  1. Daniel Reynolds

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.

      1. Brian OShea

        Also makes sense to me (following up much later). @jwise77 , @samskillman , can I get a couple more sets of eyes/approves on this?

        1. Brian OShea

          @jwise77 , @samskillman - just a ping on this: could you both take a quick look? I think this PR is ready for approval.

          1. Brian OShea

            @jwise77 , @samskillman , another ping: mind taking a quick look and hitting approve if you're on board?

              1. Brian OShea

                I don't want to violate the 3-approval rule, so I'll just bug him via direct email. And if that fails: the Enzo hired goons!