This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Alternative solver than PETScSNES, for solving an nonlinear problem with bound constraints

0 votes

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())

asked Jul 7, 2016 by Whistler FEniCS Novice (460 points)

2 Answers

0 votes

Maybe you could try the PETScTAOSolver interface. See undocumented/buckling-tao or undocumented/buckling-tao

answered Jul 7, 2016 by tianyikillua FEniCS User (1,620 points)
0 votes

As an alternative you can try to use Trilinos with FEniCS, there might be an alternative implementation for a similar problem.

answered Jul 12, 2016 by Massimiliano Leoni FEniCS User (1,760 points)
...