Obscure undefined behavior bugfix

#353 Merged at c22dbe2
Repository
aemerick
Branch
week-of-code
Repository
enzo
Branch
week-of-code
Author
  1. Andrew Emerick
Reviewers
Description

Obscure bug when using Zeus hydro - likely does not affect anything. This only came up when running in debug with memory leak detection.

Densfield is left as -1 when AccelerationHack is True in grid::InterpolateBoundaryFromParent. The use of Densfield was not housed by an AccelerationHack != True check in the edited lines. Fixing this.

Comments (2)

  1. dcollins4096

    Is there a possible reason we would want to perpetuate the information about the density field to the acceleration interpolation?
    That's probably not particularly germane to this PR, and probably a higher order affect, but if there's an inconsistency between, velocity interpolation and the acceleration interpolation, that could lead to odd glitches that are nearly impossible to find.