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

How to specify different linear solver (MUMPS) in C++

+1 vote

What's the C++ equivalent of this:

solve(a == L, u, bc, solver_parameters={'linear_solver':'mumps'})

When I write it as above, I get errors.

asked Aug 8, 2014 by Theodore FEniCS Novice (780 points)

1 Answer

+5 votes
 
Best answer
problem = LinearVariationalProblem(a, L, u, bc)
solver = LinearVariationalSolver(problem)
solver.parameters["linear_solver"] = "mumps"
solver.solve
answered Aug 8, 2014 by Theodore FEniCS Novice (780 points)

You're probably meaning

solver.solve()

on the last line :)

...