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

Operator update with LU solver (Python)

0 votes

I've got a concern about the LU solver.
Given two different operators A and B (i.e. build from different weak forms), the code below produces sol_a == sol_b if PETSc is the LA backend but returns different solutions (as it should) if the backend is set to uBLAS.

solver = LUSolver()
solver.parameters['reuse_factorization'] = True

solver.set_operator(A)
sol_a = Function(V)
solver.solve(sol_a.vector(), rhs)

solver.set_operator(B)
sol_b = Function(V)
solver.solve(sol_b.vector(), rhs)

Same behavior if the solution is computed in the form

solver.solve(A, sol_a.vector(), rhs)

But the solutions are different (i.e. correct) if the parameter key 'reuse_factorization' is set to False.
Is this a bug (in which case I'll post this on the mailing-list) or am I missing something? I can post the complete code if someone feels it is necessary.
Thanks for any help!

asked Dec 4, 2014 by BC FEniCS Novice (790 points)

This is probably related to https://bitbucket.org/fenics-project/dolfin/issue/269. I've linked this question to the Issue tracker to get this question answered once Issue 269 is fixed.

...