This adds a new simulation runtime parameter, UserDefinedRootGridLayout.
When set, this specifies the number of root grid decompositions along each axis. This makes it possible to specify the root grid decomposition manually in situations where the default one tile per processor decomposition yields inefficient hierarchies. When UserDefinedRootGridLayout is set, the other root grid decomposition routines are ignored.
This is largely identical to the delined PR 209 which was closed due to the presence of changesets that have been stripped in the main repo.
Should there be a check to ensure that the user-set number of root grid tiles is equal to the number of MPI tasks? At present, the root grid is auto-decomposed so that N_tiles = N_tasks always. Either way, I suggest explicitly talking about this in the documentation as a "hey, remember that you should set N_tiles to N_tasks all the time, unless you really know what you're doing!"
I actually added this to avoid setting N_tiles = N_CPUs. It works for my problems just fine, although I bet it might not work as nice for a cosmology simulation. I can add some additional warnings about running like this, though.
I think that's totally fine, and there's no particular reason that it's important for a cosmology simulation - when you're using an AMR calculation, most of the work is at high levels, so it's not critical. I would just update the docs to mention how the default behavior works (when Enzo does it automatically), and maybe just have a word of warning that you should set this only if you know what you're doing.