I've added a couple of options to have a smooth interface between the sphere and ambient medium in the collapse and photon tests. Another added option is constant pressure, given a density profile, where the pressure in the sphere equals the pressure at the outer sphere radius. I've added the new parameters to the docs and it passed the CollapseTestNonCosmological test.
Here's the CollapseTestNonCosmological test with the smoothing option on. The default behavior is still the same. To do this, I added the option CollapseTestSphereSmoothSurface = 1.
Looks good to me!
This looks like a useful addition. My only concern is that the spherical CollapseTest is already extremely complicated, with many knobs and switches that have been added over the years and that it might be a good idea to come back and try to streamline a bit. That being said, I don't think my concern should hold up acceptance.
I completely agree about both points. My hope is that we can either use yt => GDF => Enzo, or possibly implement yt-like operators and fluid operations that can do things like this. But, this by itself seems great.
Yes, the collapse test is becoming more and more complicated. I hope we can change things in 3.0 with yt/GDF or more initialization operators, like what Matt said.
Once this hits four approves I would say it's ready to go. The whole thing is very isolated, useful, and nicely implemented.