Commits

John Wise committed d7e69b4

Enforcing a density floor for initial density field

  • Participants
  • Parent commits bf0f6b2
  • Branches week-of-code

Comments (0)

Files changed (1)

File src/enzo/Grid_PhotonTestInitializeGrid.C

 	  cindex = (i-GridStartIndex[0]) + ActiveDims[0] *
 	    ((j-GridStartIndex[1]) + (k-GridStartIndex[2])*ActiveDims[1]);
 	  if (density_field != NULL)
-	    density = density_field[cindex];
+	    density = max(density_field[cindex], 1e-6);
 	  else
 	    density = 1.0;
 	  if (HII_field != NULL)