[petsc-users] Accessing the elements of a Matrix

Smith, Barry F. bsmith at mcs.anl.gov
Tue Jan 22 15:30:02 CST 2019


   MatGetArrayF90 is an out-dated routine. For dense matrices you can use MatDenseGetArrayF90()

  For sparse matrices you can use MatGetValues() or MatGetRow()

   Barry


> On Jan 22, 2019, at 3:15 PM, Maahi Talukder via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hello All,
> 
> I was trying to use ' MatGetArrayF90' to access a matrix and check its values. But I couldn't do it, probably because of the specific compiler I am using. 
> Is there any other way to access a matrix and check its values ?
> 
> 
> Regards,
> Maahi Talukder
> Clarkson University



More information about the petsc-users mailing list