Added draft/untested support for periodic BCs.