Factorize set_grid_to_zero by calling set_row_to_zero inside