Use `space%dim` instead of `box%dim` in several places
Description
Replace gr with mesh in several function arguments and pass space to a few more places in order not to access box%dim
.
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.