Is there an alternative solution for solving a nonlinear problem with bound constraints?
I am currently using PETScSNES solver. But it seems that the solver is not working properly for my problem. (or I am doing it wrong) I have an quadratic problem
Code
min u^T A u + u^T b
-1 <= u <= 1
I am using
u = Function(V)
du = TrialFunction(V)
v = TestFunction(V)
F = u^T A u + u^T b
dF = derivative(F,u,v)
ddF = derivative(dF,u,du)
problem = Subproblem(ddF, dF)
solver = PETScSNESSolver()
PETScOptions.set('snes_max_it', '1000')
solver.parameters["linear_solver"] = "lu"
lb = interpolate(Constant(-1.) , V)
ub = interpolate(Constant(1.) , V)
solver.solve(problem, u.vector(), lb.vector(), ub.vector())