  A numerical method is proposed in order to track field lines of
three-dimensional divergence free fields. Field lines are computed by a locally
valid Hamiltonian mapping, which is computed using a symplectic scheme. The
method is theoretically valid everywhere but at points where the field is null
or infinite. For any three dimensional flux conservative field for which
problematic points are sufficiently sparse, a systematic procedure is proposed
and implemented. Construction of field lines is achieved by means of tracers
and the introduction of various Hamiltonians adapted to the "geometrical state"
each line or tracer is. The states are artificially defined by an a priori
given frame of reference and Cartesian coordinates, and refer to a Hamiltonian
which is locally valid at the time step to be computed. This procedure ensures
the preservation of the volume (flux condition) during the iteration. This
method is first tested with an ABC-type flow. Its benefits when compared to
typical Runge-Kutta scheme are demonstrated. Potential use of the method to
exhibit "coherent" Lagrangian structures in a chaotic setting is shown. An
illustration to the computation of magnetic field lines resulting from a
three-dimensional MHD simulation is also provided.
