Numerical Study of Magnetic Topology and Test Particle Transport in the Reversed Field Pinch and in the Tokamak