https://123dok.net/document/yd7k3wjl-scalar-product-method-statistical-mechanics-boundary-tension.html