Gradient calculation for anisotropic FWI