Numerical simulation of premixed flames interacting with obstacles