[Trilinos-Users] Viewing entries of TpetraCrs matrix

Ashesh Chattopadhyay ashesh6810 at gmail.com
Thu Jun 16 13:26:00 EDT 2016


Hi All,

I have filled up a sparse matrix of using Tpetra::Crs matrix. I want to the
view the entries of a matrix and their locations essentially for debugging
purposes to make sure my logic is correct. To do that I am defining a
*local_matrix_type* of *Kokkos::CrsMatrix<>* and *values_type* is typedefed
as *k_values*  of *local_matrix_type::* . Then, assuming *A* is sparse
matrix I use the following:

*local_matrix_type lcl=A->getLocalMatrix();*
*k_values values =lcl.values;*

I understand that *values* will be a Kokkos view of type<double*> which is
like a 1-D array. Can you help me understand  what *values *is giving me?
Is it all the non zero elements in A as a linear array? I essentially want
to see the global locations of A and the values in those location after
I've done fillComplete, just to check that it's correct. Is there some
other way to do this?

Thanks
Ashesh

-- 
Research Assistant, Multi-Scale Multi-Physics Computation Lab
University of Texas at El Paso
Texas, El Paso, USA
(+1) 915-355-5013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160616/9988d3ba/attachment.html>


More information about the Trilinos-Users mailing list