  By using the Onsager principle as an approximation tool, we give a novel
derivation for the moving finite element method for gradient flow equations. We
show that the discretized problem has the same energy dissipation structure as
the continuous one. This enables us to do numerical analysis for the stationary
solution of a nonlinear reaction diffusion equation using the approximation
theory of free-knot piecewise polynomials. We show that under certain
conditions the solution obtained by the moving finite element method converges
to a local minimizer of the total energy when time goes to infinity. The global
minimizer, once it is detected by the discrete scheme, approximates the
continuous stationary solution in optimal order. Numerical examples for a
linear diffusion equation and a nonlinear Allen-Cahn equation are given to
verify the analytical results.
