Extract spatial model gradients.
This function takes a mesh object and computes the spatial
model gradient of each field contained in the mesh. The
function returns the same mesh with additional fields for
each component of the gradient.
Model gradients are always computed in Cartesian coordinates.
By construction of the Lagrange basis, the gradients are not continuous
across elemental boundaries. Hence, the values of the gradient on points
shared between elements, depend on which element they are computed in.