Krylov parameters

Asked by Ángel Javier Omella Milián

Hi, I'm new but I hope to do it properly...
I'm trying to solve a problem but I can not control the parameters of the solver... in dolfin 1.1.0

 focusing on the problem:

[...]
 problem = LinearVariationalProblem(a, L, u, bcs)
    solver = LinearVariationalSolver(problem)
    solver.parameters['linear_solver'] = 'gmres'
    solver.parameters['preconditioner'] = 'jacobi'
    prm = solver.parameters['krylov_solver']
    prm['absolute_tolerance'] = 1E-9
    prm['relative_tolerance'] = 1E-7
    prm['maximum_iterations'] = 10
    prm ['gmres']['restart']= 7
    prm["monitor_convergence"] = True
    prm["error_on_nonconvergence"] = True

    info(solver.parameters, True)
    set_log_level(PROGRESS)

    solver.solve()
[...]

...It runs ok and tells me...

_________________________________________
[...]
  Solving linear variational problem.
  Applying boundary conditions to linear system.
  Applying boundary conditions to linear system.
  Solving linear system of size 3298 x 3298 (PETSc Krylov solver).
  PETSc Krylov solver starting to solve 3298 x 3298 system.
  PETSc Krylov solver (gmres, jacobi) converged in 169 iterations.
___________________________________________

If I fixed maximum_iterations to 10,
Why my problem converged? Why do not solver stops in 10 iterations and diverge? Why it runs to 169 iterations?
When I read info parameters, the values are ok, but later the solver are not taking into account these parameters!!

When I change absolute and relative tolerance the number of iterations remains constant... in 169, obtaining the same result...
it not runs well...

I would be very grateful if someone could tell me what I'm doing wrong or explain me what is happening??

thx

Question information

Language:
English Edit question
Status:
Answered
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Ángel Javier Omella Milián for more information if necessary.

To post a message you must log in.