Added Dirichlet and Neumann boundary conditions to FEM solvers for nonlinear problems.