Merge boundary conditions