FEM simulation of BAW/SAW and SAW/BAW conversions in gratings on the surface of half-infinite substrates