The simulation is done using successive averages. This is the result for a very low resolution grid.
The code can be accelerated using OpenMP. Resolution of grid can be changed as macros. Compile using
g++ laplace_omp.cpp -fopenmp -O3 -I /usr/include/python2.7 -lpython2.7