A simple method for automatic adaptation of finite element meshes to changes in the boundary shape