A simple method for automatic update of finite element meshes