Skip to content

Implementing the periodic boundary condition manually #427

Answered by tomidakn
rahulgaur104 asked this question in Q&A
Discussion options

You must be logged in to vote

Your implementation copies the boundaries within one MeshBlock, so it does not work when you have more than one MeshBlocks in the periodic direction even if you fix Kyle's point. When you have more than one MeshBlocks, Periodic boundary conditions are implemented as inter-MeshBlock communications and cannot be implemented as a user-defined boundary function.

If you really want to implement what you are thinking of, you have to hack into the code. Perhaps the easiest way is to apply v2 reflecting condition after normal periodic boundary communications are completed. It is not impossible, but not trivial. At least the code does not provide such an interface. I would rather suggest you to re…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@felker
Comment options

Answer selected by rahulgaur104
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants