[Trilinos-Users] Using Belos in place of AztecOO
Eric Marttila
eric.marttila at thermoanalytics.com
Fri Jul 1 11:53:15 EDT 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aztec.cpp
Type: text/x-c++src
Size: 1227 bytes
Desc: not available
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160701/d5dc3f91/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: belos.cpp
Type: text/x-c++src
Size: 2294 bytes
Desc: not available
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160701/d5dc3f91/attachment-0001.bin>
More information about the Trilinos-Users
mailing list