[petsc-dev] aij and baij data access

Barry Smith bsmith at mcs.anl.gov
Mon Feb 3 11:27:28 CST 2014


On Feb 3, 2014, at 10:38 AM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Feb 3, 2014 at 10:22 AM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
> Hi, Is it possible to access to the raw data of aij matrices(row indices, column indices and data). I need to used for and optimize algorithm, this data will keep constant all the time. So is it cossible with the public interface you have or not??

   Note also that if you are coding your algorithm specifically for the underlying data structure (which is ok if you need to for performance reasons, like a factorization) then you might as well just include the private headers and access the data directly. src/mat/impls/aij/seq/aij.h 

   Barry

Obviously you should never do this from within a regular PETSc application to set values into a matrix or something like that.


> 
> This is a question for petsc-maint.
> 
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatGetColumnIJ.html
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatSeqAIJGetArray.html
> 
>     Matt
> 
> Thanks
> 
> 
> 
> -- 
> 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




More information about the petsc-dev mailing list