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

Reuse preconditioner structure in fenics 2016.1

+1 vote

Hello,

In order to save and reuse the preconditioner structure, I used to do:

solver.parameters['preconditioner']['structure'] = 'same'

which is not working in the new fenics release. Doing the above I get:

    raise KeyError("'%s'"%key)
KeyError: "'preconditioner'"

I didn't find release notes for the new version, so I have to ask here: what's the new way to save the prec structure?

Thank you!

asked Jul 1, 2016 by felipe_galarce FEniCS User (1,190 points)

1 Answer

0 votes
 
Best answer

You can reuse preconditoner by using the PETScKrylovSolver:

s = PETScKrylovSolver("gmres", "amg")
s.set_reuse_preconditioner(True)

I don't know what happened to the possibility of setting "same_nonzero_pattern", anybody know?

answered Jul 3, 2016 by Øyvind Evju FEniCS Expert (17,700 points)
selected Jul 3, 2016 by felipe_galarce
...