Polynomial algorithm for exact calculation of partition function for   binary spin model on planar graphs
  In this paper we propose and realize (the code is publicly available at https://github.com/Thrawn1985/2D-Partition-Function) an algorithm for exact calculation of partition function for planar graph models with binary spins. The complexity of the algorithm is O(N^2). Test experiments shows good agreement with Onsager's analytical solution for two-dimensional Ising model of infinite size. 
Yakov M. Karandashev and Magomed Yu. Malsagov
cond-mat.dis-nn cond-mat.stat-mech cs.DS physics.comp-ph