[Trilinos-Users] Jacobi and Gauss-Seidel smoothers

Hoemmen, Mark mhoemme at sandia.gov
Tue Sep 13 13:28:21 EDT 2016



On 9/13/16, 10:48 AM, "Trilinos-Users on behalf of trilinos-users-request at trilinos.org" <trilinos-users-bounces at trilinos.org on behalf of trilinos-users-request at trilinos.org> wrote:
>Message: 13
>Date: Tue, 13 Sep 2016 16:43:54 +0100
>From: Martin Vymazal <martin.vymazal at vki.ac.be>
>To: trilinos-users at trilinos.org
>Subject: [Trilinos-Users] Jacobi and Gauss-Seidel smoothers
>Message-ID: <90ae33366e927b5754371601289fe0e5 at vki.ac.be>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>Hello,
>
>  I'm trying to understand how to use Jacobi and Gauss-Seidel methods in 
>Ifpack2 as smoothers. The documentation says that since Ifpack2 derives 
>from Tpetra::Operator, it can also be used as a smoother. I found an 
>example in Doxygen docs for Ifpack2::Relaxation which has the following 
>code:
>
>// Prepare an Ifpack2 preconditioner called 'prec'
>// ...
>// Prepare the relaxation instance for use.
>prec.initialize ();
>prec.compute ();
>// Now prec may be used as a preconditioner or smoother,
>// by calling its apply() method, just like any Tpetra::Operator.
>
>Tpetra::Operator::apply(X, Y, ...) takes two Tpetra::MultiVectors, so I 
>assume I can't update the values of the input vector in place and must 
>store the updated entries of X in vector Y. Can X and Y be the same 
>multivector? 

No.  X and Y may not be the same MultiVector, and they may not alias one another.

>Could you please provide a simple example how to use 
>Ifpack2 for relaxation? Thank you.

Trilinos/packages/ifpack2/example/ex1.cpp

mfh



More information about the Trilinos-Users mailing list