How did Trafalgar Law get to and leave Marineford? My question is two-fold: 


How did Trafalgar Law and the other "Worst Generation" pirates get to Marineford? I thought you had to go through the tri-currents? Or is that the tri-currents are just a faster way but you can come any other way since Marineford is not in the calm belt?
How did Trafalgar Law leave the tri-currents? This especially puzzled me. I am thinking now that it might be because of their submarine. My assumption is that it can move freely, does not depend on currents, but I am not sure. 


I would appreciate answers that are based on more than just speculation.
So, to add a bit of clarification to all the answers.

The Tri-current (Tarai Current) are a natural whirlpool at the intersection of the Calm Belt and Red Line. The WG build three facilities around the current (Impel Down - MarineFord - Enies Lobby), making use of the current power to fast travel between the three. The currents work also underwater as per natural ocean currents, but probably have different speeds and power at different underwater levels.

Here's a pictures depicting the wihrlpool:



The Gates of Justice are 3 such gates placed at the "corners" of the current from where you can enter or access it. This is the only way for normal ships (floating ships) to get inside the current. The whole phenomenon doesn't quite follow natural physics so one shouldn't try to find natural ways of how to enter/exit it.

Also, you can't get in from the outside without using the gates as the outside currents will push you away from the whirlpool and vice-versa from the inside where the whirlpool will keep pushing you into a circle.

Now on how Law &amp; others managed to get there.

One possibility is that they entered the current by going underwater through the Gates of Justice while they were openend. After the gates close, the outside currents will keep you from entering, even underwater. That is why Bepo said to hurry as the gates are closing, so they could catch the overflowing current to the outside, while submerged. The same applies to WB's ship who was also underwater.

Another possibility for WB's ship to enter is if he used the Gura Gura no Mi's powers to temporarily divert the currents and enter from any side of the whirlpool. Law still had to enter from the gates nontheless.

And even another posibility could be that they entered MarineFord by bypassing the big current, from Sabaody Arch. for exemple, and managed to get around the marines defence of those waters. They probably left through the Gate of Justice to make for a quick escape rather then going back and risking to get captured.

More on One Piece fandom about the Tarai Current.