def estimateL2error(grid1, grid2, alpha2):
    """
    find those grid points which are in grid2 but not in grid1. The L2
    error of the new sparse grid function is then reduced with respect
    to

    |L2(g1) - L2(g2)|^2 ~ \\sum_{i = 1}^N |v_i|

    @param grid1: Grid, old grid
    @param grid2: Grid, new grid
    @param alpha2: DataVector, new surpluses
    """
    gs1 = grid1.getStorage()
    gs2 = grid2.getStorage()
    ans = 0
    for i in range(gs2.getSize()):
        gp = gs2.getPoint(i)
        if not gs1.isContaining(gp):
            ans += abs(alpha2[i])
    return ans
