Add check for periodic boundary conditions
Without this check, it can happen that nper=0, i.e. there are no periodic points on the same rank in the domain distribution. This leads to a segfault in the GPU version.
- I have checked that my code follows the Octopus coding standards