Numerical experiments of compressive fracture in masonry-like solids. An energy-based variational approach