Parameters in FEniCS 2018/2019 equivalent to LUSolver('mumps') from 2017

I have been using DOLFIN 2017.2.0 for a long while and it seems I might have to switch to one of the later releases, however, my code breaks when I run it under the later versions. It is kind of hard to tell how much of it breaks, since I will have to fix each part to go on, but here i my first problem:

I used to create a solver

solver = LUSolver('mumps')

which now breaks.
What is/are the equivalent statement(s) in DOLFIN 2018.1.0 and/or 2019.1.0?

If you look into the dolfin C++ code in dolfin-2018.1.0/dolfin/la/PETScLUSolver.h on Line 52, it reads as:

PETScLUSolver(std::string method="default")

And in the Pybind11 interface file (dolfin-2018.1.0/python/src/la.cpp) on Line 852, it reads as:

.def(py::init<std::string>(), py::arg("method")="default")

as part of the available python interface for PETScLUSolver for Python.

I’ve not dived into dolfin.LUSolver. But if you are using PETSc as the backend, maybe give PETScLUSolver directly a try. The only thing to note is it seems like there’s no interface for set_operator for PETScLUSolver, so you might need to do

solver = dolfin.PETScLUSolver(A, 'mumps')

as indicated by Lines 855~856 of Pybind11 interface code.

Hope this help.
Victor

2 Likes

If you want to have more specific control over petsc, take a look at my answer here:

There it is shown how you can use petsc directly, and how you can define which solver is chosen using “command line options” for petsc.