GniCodes - Matlab Programs for
Geometric Numerical Integration
Ernst Hairer and Martin Hairer
Abstract.
Geometric numerical integration is synonymous with
structure-pre\-ser\-ving integration of ordinary differential
equations.
These notes, prepared for the Durham summer school 2002,
are complementary to the monograph of
Hairer, Lubich and Wanner "Geometric Numerical Integration".
They give an introduction
to the subject, and they discuss
and explain the use of Matlab programs
for experimenting with structure-pre\-serving algorithms.
We start with presenting some typical classes of problems
having properties that are important to be conserved
by the discretization
(Section 1).
The flow of Hamiltonian differential equations
is symplectic and possesses
conserved quantities. Conservative
systems have a time-reversible flow. Differential
equations with first integrals and problems on
manifolds are also considered.
We then introduce in Section
2 simple symplectic and symmetric integrators,
(partitioned) Runge-Kutta methods,
composition and splitting methods, linear
multistep methods, and algorithms for Hamiltonian
problems on manifolds. We briefly discuss their symplecticity
and symmetry. The improved performance of such geometric
integrators is best understood with the help of a
backward error analysis (Section 3).
We explain some implications for the
long-time integration of Hamiltonian systems
and of completely integrable problems.
Section 4
is devoted to a presentation and explanation of
Matlab codes for implicit Runge-Kutta,
composition, and multistep methods. The final
Section 5 gives a comparison of the
different methods and illustrates the
use of these programs at some typical interesting
situations: the computation of Poincar\'e sections, and the
simulation of the motion
of two bodies on a sphere. The Matlab codes as well as
their Fortran 77 counterparts can be downloaded at
http://www.unige.ch/math/folks/hairer
under the item ``software''.
Key Words.
Geometric numerical integration, Matlab codes,
Hamiltonian systems, reversible systems,
symplectic integrators, symmetric integrators,
backward error analysis, Runge-Kutta methods,
linear multistep methods, composition methods.