GMRES restart number of iterations FEniCS 2017.1


129
views
1
3 months ago by
Seems the interface to this parameter has been removed? I'm trying to use the NonlinearVariationalProblem class.. Is there a way to set the germs restart iterations, or should I wait for 2017.2?
Community: FEniCS Project

2 Answers


2
3 months ago by
Hi, you can use dolfin.PETScOptions.set("ksp_gmres_restart", 150).
0
3 months ago by
pf4d  
In additon to Martin's answer, there is this :

https://fenicsproject.org/qa/10680/how-to-set-gmres-restart-in-2016-1-0

solver = PETScKrylovSolver("gmres", MyPrecon)
solver.set_operator(A)
solver.ksp().setGMRESRestart(40)​
1
Right, this is more explicit.
written 3 months ago by Martin Řehoř  
At first I considered suggesting waiting until 2017.2, but I decided it was too sarcastic.
written 3 months ago by pf4d  
The previous answer is what I was looking for. This one doesn't apply to those using the NonlinearVariationalProblem class, am I correct? "solve" as defined above would not change the gmres Krylov solver settings for your NonlinearVariationalSolver. Unless there is a way to pass PETScKrylovSolver into your NonlinearVariationalSolver? 
written 3 months ago by Joshua Chen  
It is simply a different way to do the same thing, whatever floats your boat.
written 3 months ago by pf4d  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »