Error in periodic boundary condition

Hi @skaore,

could you please share the project with us? Makes it easier to identify the problem you are dealing with.

Please also have a look at: How to share a project with others

Cheers,

Jousef