Apply weak boundary condition