Trajectory calculations for axial injection of ions into a magnetic field: overcoming the magnetic mirror effect with an r.f. quadrupole lens