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

Sebastian Kreissl Sebastian.Kreissl at Colorado.EDU
Tue Dec 14 22:04:14 MST 2010


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/8f8bea42/attachment.html 


More information about the Trilinos-Users mailing list