Rewritten periodic BC, to be compatible in sequential and parallel and to allow mixed finite element spaces.