<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def eval_grad(self):
 """Compute gradient in spatial domain for variable Y."""


        # Compute D^T(D Y - S)
        return self.D.T.dot(self.D.dot(self.Y) - self.S)