reworked cleaner interface for gradient and grid gradient computations
Former-commit-id: 6c430c0511f0e6c20772b0e9297a13fcda9d6e41