Hi All,

I am currently using svn revision 22915, and I think I have spotted a bug in 
one of the TrilinosWrappers::SparseMatrix::reinit() functions, specifically the 
one that takes an Epetra_CrsMatrix as an input.  I observe weird behavior in 
which the diagonal entry for a given row in the Epetra_CrsMatrix would be 
assigned to every non-zero column in the TrilinosWrappers::SparseMatrix, while 
all the other off-diagonal entries in the Epetra_CrsMatrix would be ignored.  
On line 684 of trilinos_sparse_matrix.cc, my current revision reads:

for (unsigned int i=0; i<my_nonzeros; ++i)
          values[i] = in_values[0];

But I think it should instead be

for (unsigned int i=0; i<my_nonzeros; ++i)
          values[i] = in_values[i];

That is, values[i] and in_values[i] should be walked through in tandem, rather 
than just assigning the diagonal entry in_values[0] throughout.

Does this make sense, and have other people observed this behavior?  I ran into 
it originally when calling the TrilinosWrappers::SparseMatrix::mmult() function.

Best,
Josh


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to