Motivated by figuring out conditions for constructing C^r elelment spaces, we’’ve proposed a sheaf theory framework for finite elements. We believe that the sheaf cohomology gives information of obstructions on constructing global finite element spaces. This time, we focus on a general algorithm that computes the sheaf cohomology over discrete sets, which applies to our case. This talk is base on an on-going joint work with Jun Hu, Ting Lin and Qingyu Wu.