P-Bezier energy optimisation for elastic solutions of masonry-like panels