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

James Elliott jjellio3 at ncsu.edu
Sun Feb 10 08:01:09 EST 2019


Checkout the function:

belosProblem.setProblem()

belosProblem.setInitResVec(R0);

https://trilinos.org/docs/dev/packages/belos/doc/html/classBelos_1_1LinearProblem.html#af7f8e5efeb59f7ad50e2e012384bedf0



On 2/9/2019 8:10 PM, Corey A. Henderson wrote:
> I did not. I was going to ping the thread to be sure it had been seen.
>
> I am still not able to convince myself that x is being used as a guess.
>
> On Sat, Feb 9, 2019, 8:19 PM Heroux, Mike <MHeroux at csbsju.edu 
> <mailto:MHeroux at csbsju.edu> wrote:
>
>     Corey,
>
>     Did you get past this issue? Messages being sent
>     totrilinos-users at trilinos.org
>     <mailto:trilinos-users at trilinos.org>are not being reliably
>     received by everyone on the list.
>
>     Thanks.
>
>     Mike
>
>     *From: *Trilinos-Users <trilinos-users-bounces at trilinos.org
>     <mailto:trilinos-users-bounces at trilinos.org>> on behalf of "Corey
>     A. Henderson" <cahenderson at wisc.edu <mailto:cahenderson at wisc.edu>>
>     *Date: *Wednesday, December 26, 2018 at 1:30 PM
>     *To: *"trilinos-users at trilinos.org
>     <mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org
>     <mailto:trilinos-users at trilinos.org>>
>     *Subject: *[Trilinos-Users] Trouble Ensuring x (as Guess) is used
>     in Belos Solver
>
>     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
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at trilinos.org
> https://trilinos.org/mailman/listinfo/trilinos-users



More information about the Trilinos-Users mailing list