Top image: no refined region specified, Enzo refines on mass
2: A cylindrical region is held at a higher maximum refinement than the rest of the volume
3: Multiple regions at higher max refinement
4: A rectangle section is held at a lower maximum refinement
5: A ring is held at a lower maximum refinement
6: A ring is held at a higher maximum refinement (AMR is staggered in and out to stop edges with big refinement jumps)
Elizabeth, this looks awesome. I'm going to test this out on a cosmology problem and I'll get back to you, but I think this is a great addition to the code base. Great work.
Thanks! Let me know how it works on a cosmo problem and if you need any explanation for setting it up prior to me writing the docs (though the code is actually very simple).
Since everything is in code units, I don't see why there'd be any problem with a comoving box, but expansion is something I try and avoid in my life so there may yet be a bug.
I think this is a great addition to the code. I've wanted to do something like this in the past and it will be very nice to be able to use it in the future. I have two concerns but I think they should be easy to work out.
First, the RotatingDisk initializer seems to be very similar to the GalaxySimulation initializer. Do we need both? Can we consolidate a bit to avoid code duplication?
Second, it would also be great to get some documentation for the new parameters.
Thanks again for your work on this :)
Yes, to be honest we don't really need the RotatingDisk initialiser. I only added it in because Brain suggested that there ought to be a test problem to try out the functionality, so I made the simplest set-up I could think of to do this. If we're happy using GalaxySimulation for this, we can just remove RotatingDisk.
The only argument I can think for keeping it is --because it is a cut-down GalaxySim-- it might make a better 'test problem' if we needed it in that suit. But there isn't really an easy 'test' (i.e. with a yes/no golden standard answer) for the refined regions, so maybe not necessary.
I'll do the docs.
Hi Elizabeth, this is great work, and it supersedes my Grid_FlagCellsToAvoidRefinementRegion routine. It looks good to me.
Hi again, I just tried to compile your additions with precision-32 and particles-64, and there are some problems with FLOAT / float definitions in the routines. Could you fix these? Thanks.
Hi John -- when I try that combination I hit problems, but not with my routines. It fails in Grid_FlagCellsToBeRefinedByResistiveLength.C. I'm not sure what the problem is there, since the routine uses FLOAT, not float. Do you see a different error?
I should have looked whether the error was coming from your mods! I think it was introduced in a recent PR. I'll fix it in another PR. Thanks for looking into this!
I've used multiple rectangular regions with success, so I'm approving.