Multi periodic boundary condition

You could have a look at this post.