swap phi1 and phi2 in torus