Merge pull request #30 from komatits/devel

better (more general) implementation of periodic boundary conditions;