[Trilinos-Users] Trouble Ensuring x (as Guess) is used in Belos Solver

Corey A. Henderson cahenderson at wisc.edu
Wed Dec 26 14:30:01 EST 2018


Hello,

I am trying to set up an iterative call to the Pseudoblock GMRES solver in
Belos where I expect x to vary only slightly between calls (because b
varies only slightly). When I inspect the number of iterations after
subsequent calls, even if b is not changed, I get no reduction in
iterations as I would expect from using the previous x as a guess. I
believe I am missing something in how Belos is reset().

I need some help in learning how to ensure the previously-solved x is
reused as a guess for subsequent iterations.

Pseudocode:

Set up A, x=0, preconditioner M, initial b
Create problem from M, A, x, b
Create solver ("GMRES")
Solver.setProblem()
loop
    solve()
    print numIters
    copy off of x
    Solver.reset(Problem)  <-- Where I think my mistake is
    update b
end loop

Even if b is unchanged, I get the same number of iterations (and duration)
on subsequent solves, where I would expect them to drop significantly since
x is near (or just is) the solution. If I omit the solver.reset() call I
get an error on the next solve(). I believe x is not being used as a guess
the way I'm setting up my code, but I don't understand why.

Can someone explain how to ensure Belos uses x as a guess? I have been over
the documentation and can't figure it what I'm doing wrong.

Thanks!

Corey
-- 
Corey A. Henderson
PhD Candidate and NSF Graduate Fellow
Dept. of Engineering Physics
Univ. of Wisconsin - Madison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20181226/527db17b/attachment.html>


More information about the Trilinos-Users mailing list