The amount of heat transferred to the brick is equal to change of its mechanical energy.
So, the change of the brick temperature