Bug fix in rarefaction fan in flux_twoshock.F

#338 Merged at 8d60501
Repository
enzo-dev-clean
Branch
week-of-code
Repository
enzo-dev
Branch
week-of-code
Author
  1. Greg Bryan
Reviewers
Description

This PR removes an incorrect min(dv,1) in the determination of the physical quantities in a rarefaction fan in flux_twoshock (so only affects PPM with twoshock Riemann solver). This line has been there for a long time but appears to be a simple bug. There is no reason to take a min here and dv (the velocity difference between the head and tail of the fan) has units of velocity, so the value of 1.0 is clearly suspect. This bug probably has had little effect since generally velocities differences are small but could be an issue for some choices of VelocityUnits and also occurs at very large pressure differences in some cases. I consulted with Alexei Kritsuk and John Wise and they agreed with this assessment.

Comments (2)

  1. Brian OShea

    This seems pretty straightforward to me. I'll run the test suite, but pending it passing that I'm on board with immediate merger. (It may also break stuff in the test suite, but that's understandable since this is a bug fix.)