[Trilinos-Users] Using Belos in place of AztecOO

Alicia Klinvex aklinvex at gmail.com
Sat Jul 2 00:12:20 EDT 2016


Hello Eric,

I don't believe you have to recreate the LinearProblem object when A
changes.  You should be able to call setOperator, then setProblem.  (You
will also want to call set[Left/Right]Prec before setProblem.)  Calling
setProblem is necessary, for it computes the initial residual.

Best wishes,
Alicia

On Fri, Jul 1, 2016 at 9:53 AM, Eric Marttila <
eric.marttila at thermoanalytics.com> wrote:

> I have been using AztecOO in my code and am interested in using Belos
> instead (with the goal of switching over to using TPetra and MuLue as
> well at some point in the future).
>
> I have been using AztecOO with ML to perform linear solves within a
> non-linear outer iteration loop.  Because my 'A' matrix sometimes
> changes significantly in the outer iteration loop, I end up having to
> recompute the ML preconditioner periodically.
>
> I've attached some psuedocode for my approch using AzteccOO, as well
> as psuedocode for my current approach using Belos.  (see attached
> aztec.cpp and belos.cpp)  Both of these approaches can be summarized
> as:
>
>    1. Create A, x, b
>    2. Do initial fill of A and B
>    3. Start outer non-linear loop
>           3.1. Update values in A and b
>           3.2. Create or Recompute preconditioner if needed.
>           3.2. Solve linear system
>           3.3. Repeat previous steps until convergence
>
> The question I have is related to my use of Belos, where it appears
> that I have to recreate the Belos linear problem each time that my A
> matrix changes in the outer iteration loop.  Is that the right thing
> to do? That was not necessary when using AztecOO, and I am concerned
> that I'm adding a lot of overhead by recreating these objects, and
> especially by calling the 'setProblem()' methods.
>
> I would appreaciate any advice regarding my usage of Belos in
> this manner.
>
> Thank you,
> --Eric
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at trilinos.org
> https://trilinos.org/mailman/listinfo/trilinos-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160701/2fec1161/attachment.html>


More information about the Trilinos-Users mailing list