Support non-orthogonal grids for regridding
Description
Periodic and non-orthogonal grids are now supported. The interpolation weights are computed by solving a linear system, see https://en.wikipedia.org/wiki/Trilinear_interpolation#Alternative_algorithm. In order to avoid the corresponding matrix to become singular, the basis of the coordinate system is changed such that rotations are removed using the polar decomposition.
I have also done some refactoring to make the code simpler.
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