@ti.kernel
def clear_grid():
    for (i, j, k) in grid_m_in:
        grid_v_in[(i, j, k)] = [0, 0, 0]
        grid_m_in[(i, j, k)] = 0
        grid_v_in.grad[(i, j, k)] = [0, 0, 0]
        grid_m_in.grad[(i, j, k)] = 0
        grid_v_out.grad[(i, j, k)] = [0, 0, 0]
@ti.kernel
def clear_grid():
    for (i, j, k) in grid_m_in:
        grid_v_in[(i, j, k)] = [0, 0, 0]
        grid_m_in[(i, j, k)] = 0
        grid_v_in.grad[(i, j, k)] = [0, 0, 0]
        grid_m_in.grad[(i, j, k)] = 0
        grid_v_out.grad[(i, j, k)] = [0, 0, 0]