Currently have gradient instead of deformation tensor. I should try to get this one working correctly first.