Basic code for the calculations of the paper Field theory for recurrent mobility. If you use this code, this model, do something related to field theory on mobility or just want to help a PhD student, please cite:
Mazzoli, M., Molas, A., Bassolas, A. et al. Field theory for recurrent mobility. Nat Commun 10, 3895 (2019). https://doi.org/10.1038/s41467-019-11841-2
I tried to comment as much as possible the code in each line. If necessary, email me and I'll try to make things clearer. I'm sorry if this looks hard to read at first time.