[Trilinos-Users] Construct Epetra CrsMatrix with raw pointers

Heroux, Michael A maherou at sandia.gov
Tue Oct 25 11:35:46 EDT 2016

You can create an Epetra_CrsMatrix using “View” mode.  In this mode, your arrays will not be copied, but pointers will be set to your data.  You can then insert values row by row without copies.

Note that using this mode creates an implicitly-defined dependence between your data and the Epetra matrix, so you must retain your data, or the Epetra matrix will be corrupted.


From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of SungHwan Choi <sunghwanchoi91 at gmail.com>
Date: Tuesday, October 25, 2016 at 2:24 AM
To: Trilinos Users <trilinos-users at trilinos.org>
Subject: [EXTERNAL] [Trilinos-Users] Construct Epetra CrsMatrix with raw pointers

Dear all,
I faced new problem when I construct CrsMatrix
before I make it, I already get raw pointers; row, col and data pointers. Are there any efficient method to construct new CrsMatrix?
The simplest method is to insert each values like usual case. However, in my case, because of large size of matrix, it didn't work. If I inserted each value and called FillComplete, I faced out of memory error...... The largest memory consumption happend in FillComplete in CrsGraph class. I think I don't need that procedure becuase I already know where is nonzero values......
please help me
Sunghwan Choi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20161025/350f3aed/attachment.html>

More information about the Trilinos-Users mailing list