[Trilinos-Users] Symmetric Epetra_CrsMatrix ?

Thornquist, Heidi K hkthorn at sandia.gov
Mon Dec 1 10:57:05 MST 2008


Hi Antoine,

Yes, you can create a class that derives from Epetra_Operator that performs this operation in the Apply()
method.  This object will be accepted by both AztecOO or Belos for solving a linear system.  However,
if you need a preconditioner for the iterative solver, you will most likely need to support the Epetra_RowMatrix
interface as well.

Regards,
Heidi

---
Heidi K. Thornquist
Senior Member of Technical Staff
Electrical & Microsystem Modeling
Sandia National Laboratories
P.O. Box 5800, MS 0316
Albuquerque, NM  87185-0316
Phone: (505)284-8426
Fax:   (505)284-5451




On 12/1/08 10:29 AM, "Antoine Dechaume" <boolegue at gmail.com> wrote:

Hi Mike,

thanks for your answer. Is there a way I could use this trick with an iterative solver ?

Antoine.


On 28-Nov-08, at 3:55 PM, Heroux, Michael A wrote:

Antoine,

 There is no explicit support for symmetric storage.  However, it is possible to realize the storage savings by storing the main diagonal as an Epetra_Vector object and the strictly upper or lower triangle as an Epetra_CrsMatrix object.  Then computing y = Ax would be approximatly as follows:

 // upperA and diagA were previously constructed

 Epetra_Vector Atx(y.Map());

 upperA.Multiply(false, x, y);
 upperA.Multiply(true, x, Atx);
 diagA.Multiply(1.0, diagA, x, y, 1.0);
 y.Update(1.0, Atx, 1.0);

 Note that if your x and y are Epetra_MultiVectors, the same sequence works if you make Atx a MultiVector.

 There are other combinations of functions that will work also.  This approach does not get the computational performance that a true symmetric matvec would get, but does save storage.   We have discussed a symmetric multiply function in the past, but have not followed through on its implementation.  When considered in the larger context of preconditioned iterative methods, full support for symmetric storage is a large effort and its payoff is hard to realize for our typical problem base that is primarily a broad set that is mostly nonsymmetric.

 We will continue to evaluate the value of native support for symmetric storage.

 I hope this helps.

 Mike


 On 11/27/08 2:43 PM, "Antoine Dechaume" <boolegue at gmail.com> wrote:


Hello,

 is there a way to specify a symmetric Epetra_CrsMatrix that will store
 only upper part for instance ?

 Antoine.

 _______________________________________________
 Trilinos-Users mailing list
 Trilinos-Users at software.sandia.gov
 http://software.sandia.gov/mailman/listinfo/trilinos-users








-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20081201/8c44e882/attachment.html 


More information about the Trilinos-Users mailing list