Algorithm for periodic setting included in setGenericBC() working.