[Trilinos-Users] MatrixMatrix::Add and FillComplete

Williams, Alan B william at sandia.gov
Thu Oct 6 07:28:43 MDT 2005


A quick follow-up to my previous reply:

Note that if B is not already Filled on entry to the Add function, then
coefficients are added to B using the InsertGlobalValues method, but if
B is already Filled, then coefficients are added using the
SumIntoGlobalValues method. SumIntoGlobalValues adds values to
already-existing entries in the matrix, whereas InsertGlobalValues adds
new entries to the matrix (i.e., adds new vertices to the graph, etc.)
even if the values being inserted are already present.

So if your matrices are large and you wish to add several matrices to B,
then there is a memory and performance advantage if B is already Filled.

Alan


> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov 
> [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf 
> Of Simone Deparis
> Sent: Wednesday, October 05, 2005 11:32 PM
> To: trilinos-users at software.sandia.gov
> Subject: [Trilinos-Users] MatrixMatrix::Add and FillComplete
> 
> Hi,
> 
> In the method
> EpetraExt::MatrixMatrix::Add(A, transposeA, scalarA, B, 
> scalarB ) the matrix B is the one to which A is added (kind 
> of B*=scalarB; B+=scalarA*A).
> at input, B may be filled or not.
> 
> Is there a reason why, if B is not filled, then B is filled 
> at the end?
> I would have expected that the FillComplete is left to the 
> user, also to allow the choice of to FillComplete(map1,map2) 
> or to perform another add where the entries are not yet fixed.
> 
> Does somebody have an explanation, please?
> 
> thank you very much
> Best
> Simone
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
> 



More information about the Trilinos-Users mailing list