Description
Currently, the user provides max_grid_size
and blocking_factor
, and amrex decomposes the domain into boxes independent on particles distribution. For heavily load-imbalanced problems, when the load imbalance is relatively static (say, plasma mirror or ion acceleration simulations), it would make sense to (i) have smaller boxes in the plasma bulk where we can have ~100 particles per cell (so that at least one box can fit in GPU memory) and larger boxes in vacuum and (ii) load balance at initialization.
To have full control on these parameters, @atmyers suggested that, after injecting the particles, we built a new BoxArray that fits our needs and re-compute the distribution mapping (?) before starting the PIC iterations. This could also be useful for dynamic load balancing, where we could re-compute the BoxArray every n iterations.