An introduction to optimization on smooth manifolds