[Trilinos-Users] Issues with Aztec when using SetUseTranspose() function

Heroux, Michael A maherou at sandia.gov
Tue Dec 14 22:58:18 MST 2010


Sebastian,

What preconditioner are you using?

If you are using the native Aztec preconditioners, the SetUseTranspose() method only changes the application of the matrix, but not how the native Aztec preconditioners work, although diagonal scaling should work fine.

There is no easy way to change this behavior.  However, you can use Ifpack preconditioners and call the SetUseTranspose() method on them, then register the preconditioner with AztecOO.SetUserPrec()

I hope this helps.

Mike


On 12/14/10 11:04 PM, "Sebastian Kreissl" <Sebastian.Kreissl at colorado.edu> wrote:

Hello,
I ran into some issues when trying to solve transpose systems (for adjoint computations) when using the Aztec-package (Trilinos 10.6.2):

Here is the problem that I encountered when trying to use the SetUseTranspose() function (EpetraMatrix is the System Matrix, i.e. “A” in the linear problem Ax = b)

(1a) apply the SetUseTranspose() function to the operator:
“EpetraMatrix->SetUserTranspose(true);”
(2a) specify the system matrix and require to compute a new preconditioner based on the “new” (=transposed) system matrix:
AztecSolver->SetUserMatrix(EpetraMatrix,true);”
(3a) solve the system:
“error = AztecSolver->Iterate(EpetraMatrix, Solution, RHS,MaxIts,Tol);”

The system is solved correctly; however the solution requires an unreasonably large number of iterations.

Alternatively I tried to use the Epetra_RowMatrixTransposer-class to transpose the system:
(1b) Transpose the system matrix
“error= RowMatrixTransposer->CreateTranspose(true,EpetraMatrix);”
(2b) specify the system matrix and require to compute a new preconditioner based on the “new” (=transpose) system matrix:
AztecSolver->SetUserMatrix(EpetraMatrix,true);”
(3b) solve the system:
“error = AztecSolver->Iterate(EpetraMatrix, Solution, RHS,MaxIts,Tol);”

Again the system is solved correctly (same solution as above), but this time with a reasonable number of iterations.

>From these two cases I conclude that the SetUseTranspose()-function only affects the system matrix but not the preconditioner. Is there a way to tell the solver to apply the SetUseTranspose-flag also to the preconditioner?

Since the SetUseTranspose()-function does not seem to work in this case I considered just using the CreateTranspose()-function however, this does not allow me to re-transpose the matrix to it original “non-transpose”-structure (which is necessary for subsequent forward solutions). In the documentation for the “Epetra_RowMatrixTransposer”-class it says that the function for the reverse transformation (“UpdateOriginalMatrixValues()”) is not implemented.

In order to save memory I would like to use “EpetraMatrix” for both the forward and the adjoint solution, i.e. I would like to avoid creating a second matrix just for the adjoint problem.

Any help would be appreciated.

Thanks
Kind regards,

Sebastian Kreissl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20101214/c402dfc9/attachment.html 


More information about the Trilinos-Users mailing list