Refactor regridding
Description
Refactor the regridding routines. Create a new type that sets up the mapping between the grids upon initialization. Provide a routine to do the transfer. Use that in various places in the code. Also, fix a bug related to rounding (use nint
instead of int
as that always rounds down).
As a next step, support for different parallelizations and spacings can be implemented in just one place.
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.
Edited by Sebastian Ohlmann