def METHOD_NAME(self):
    p = self.p
    mesh = self.mesh
    cell = mesh.ds.cell
    N = mesh.number_of_nodes()
    NC= mesh.number_of_cells()
    ldof = self.number_of_local_dofs()
    cell2dof = np.zeros((NC, ldof), dtype=np.int)
    isEdgeDof = self.is_on_edge_local_dof()
    edge2dof = self.edge_to_dof()
    cell2edgeSign = mesh.ds.cell_to_edge_sign()
    for i in range(3):
        cell2dof[cell2edgeSign[:,[i]], isEdgeDof[:,i]] = edge2dof[cell2edge[:,[i]],:]
        cell2dof[~cell2edgeSign[:,[i]], isEdgeDof[:,i]] = edge2dof[~cell2edge[:,[i]],-1::-1]
    if p > 2:
        isInCellDof = ~(isEdgeDof[:,0] | isEdgeDof[:,1] | isEdgeDof[:,2])
        idof = ldof - 3*p
        cell2dof[:, isInCellDof] = base + np.arange(NC*idof).reshape(NC, idof)
    return cell2dof