[Trilinos-Users] Epetra_CrsMatrix.NormFrobenius() with overlapping maps

Nico Schlömer nico.schloemer at ua.ac.be
Thu Nov 3 16:37:37 MDT 2011


Hi all,

I just bumped into a small bug of Epetra_CrsMatrix.NormFrobenius() 
which, according to the documentation, "returns the Frobenius norm of 
the global matrix". This, however, is only true if the matrix's 
row/column maps are non-overlapping.

As a simple example, take the matrix

[ 1 1   ]
[ 1 2 1 ]
[   1 1 ]

which has Frobenius-norm sqrt(10).
If it's split up onto two processes as

[ 1 1 ]
[ 1 1 ] [ 1 1 ]
         [ 1 1 ],

the method returns sqrt(8).

For overlapping entries, 2*a*b (here 2*1*1) is missing from the sum in 
the sqrt(). I'm not quite sure if there's a simple fix for this. 
Anyways, I think that a warning in NormFrobenius() if the maps are in 
fact overlapping would be reasonable.

Cheers,
Nico



More information about the Trilinos-Users mailing list