def flux_error(g, num_flux, true_flux):
    """Computes discrete L2-error norm for the face-centered fluxes"""

    A = g.face_areas
    error = (A * (true_flux - num_flux) ** 2).sum() ** 0.5 / (
        A * true_flux ** 2
    ).sum() ** 0.5

    return error