  We drive periodically a two-dimensional diamond-octagon lattice model by
switching between two Hamiltonian corresponding two different magnetic flux
piercing through diamond plaquette to investigate the generation of topological
flat bands. We show that in this way, the flatness and topological nature of
all the bands of the model can be tuned and Floquet quasi-sates can be made
topologically flat while its static counterpart does not support the existence
of topology and flatness together. By redefining the flatness accordingly in
the context of non-equilibrium dynamics and correctly justifying it using the
Floquet joint density of states, one indeed obtains a better control of the
desired result when the input parameter space composed of temporal window
associated with the step Hamiltonian and flux becomes larger than the static
parameter space consisting of magnetic flux only. Interestingly, we find the
generation of flux current. We systematically analyse the work done and flux
current in the asymptotic limit as a function of input parameters to show that
topology and flatness both share a close connection to the flux current and
work done, respectively. We finally extend our investigation to the aperiodic
array of step Hamiltonian, where we find that the heating up problem can be
significantly reduced if the initial state is substantially flat as initial the
large degeneracy of states prevents the system from absorbing energy easily
from the aperiodic driving. We additionally show that the heating can be
reduced if the values of the magnetic flux in the step Hamiltonian are small,
the duration of these flux are unequal and on the initial flatness of the band.
We successfully explain our finding by plausible analytical arguments.
