[petsc-users] MatCreateSeqDense

Bhalla, Amneet Pal S amneetb at live.unc.edu
Thu Jan 28 18:23:17 CST 2016


Thanks!

Another related question: If I do something like this:

double* data;

// do stuff with data
data[i] = ...

Mat A;
MatCreateSeqDense(...,data,..., &A);

// do more stuff with data
data[i] = ..

Now would the matrix A reflect the change (i.e updated A[i][j]) without making an explicit call to PetscObjectStateIncrease((PetscObject)A)?


On Jan 28, 2016, at 3:06 PM, Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>> wrote:

On Thu, Jan 28, 2016 at 4:53 PM, Bhalla, Amneet Pal S <amneetb at live.unc.edu<mailto:amneetb at live.unc.edu>> wrote:
Hi Folks,

Is there a way to get back the user allocated raw data pointer (column-major order) used in creating MatCreateSeqDense() from the Mat object?

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatDenseGetArray.html

   Matt

Thanks,
--Amneet



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160129/a5ef887a/attachment.html>


More information about the petsc-users mailing list