We formulate a variational fictitious-time flow which drives an initial guess
torus to a torus invariant under given dynamics. The method is general and
applies in principle to continuous time flows and discrete time maps in
arbitrary dimension, and to both Hamiltonian and dissipative systems.Comment: 10 page