def METHOD_NAME(self, u, celltype=False, q=None):
    mesh = self.mesh
    node = mesh.node
    bc = self.cellbarycenter
    edge = mesh.entity('edge')
    edge2cell = mesh.ds.edge_to_cell()
    NC = mesh.number_of_cells()
    qf = self.cellintegrator if q is None else self.mesh.integrator(q)
    bcs, ws = qf.quadpts, qf.weights
    tri = [bc[edge2cell[:, 0]], node[edge[:, 0]], node[edge[:, 1]]]
    a = self.triangle_measure(tri)
    pp = np.einsum('ij, jkm->ikm', bcs, tri, optimize=True)
    val = u(pp, edge2cell[:, 0])
    shape = (NC, ) + val.shape[2:]
    e = np.zeros(shape, dtype=np.float64)
    ee = np.einsum('i, ij..., j->j...', ws, val, a, optimize=True)
    np.add.at(e, edge2cell[:, 0], ee)
    isInEdge = (edge2cell[:, 0] != edge2cell[:, 1])
    if np.sum(isInEdge) > 0:
        tri = [
                bc[edge2cell[isInEdge, 1]],
                node[edge[isInEdge, 1]],
                node[edge[isInEdge, 0]]
                ]
        a = self.triangle_measure(tri)
        pp = np.einsum('ij, jkm->ikm', bcs, tri, optimize=True)
        val = u(pp, edge2cell[isInEdge, 1])
        ee = np.einsum('i, ij..., j->j...', ws, val, a, optimize=True)
        np.add.at(e, edge2cell[isInEdge, 1], ee)
    if celltype is True:
        return e
    else:
        return e.sum(axis=0)