Prevent baryon density from being zero in PhotonTest problem.

#382 Merged at 65982d7
Repository
brittonsmith
Branch
week-of-code
Repository
enzo
Branch
week-of-code
Author
  1. Britton Smith
Reviewers
Description

With some compilers, the PhotonShadowing test fails because densities in a number of cells end up being zero. Surprisingly, the build system we've been running the test suite on runs this just fine, but most other systems I tried (including the bitbucket pipelines docker image) do not.

Comments (1)

  1. Brian O'Shea

    Nice catch on this, @brittonsmith ! I verified that the change works in the Docker container that we're using for the test suite, and it also still passes the test suite on my laptop. The latter demands bitwise identical results for all tests, so I'm not 100% sure why it's still working... Given that the Docker container is Linux running gcc 4.9.something and I'm running OS X 10.11 with LLVM 8.0, I'm sure there's some compiler difference in the treatment of divide-by-zero. Regardless, it seems to be resolved!