Apply boundary conditions just before the solve.