updateGradInput in SpCUnfold.C