add boundary conditions to aligngbl template