MatGetArrayF90 returns 2d array

Stephan Kramer s.kramer at
Tue Jun 30 12:45:13 CDT 2009


Why is it that MatGetArrayF90 returns a pointer to a 2d scalar array, 
instead of 1d as stated in the documentation? In fact it seems to always 
return a nrows x ncolumns array. Is this to deal with the MATDENSE case? 
Would it not be more elegant to always return a 1d array, so you get 
what you expect for the sparse matrices, and return a 1d array of length 
nrows*ncolumns in the case of MATDENSE?

Stephan Kramer

Stephan Kramer
Applied Modelling and Computation Group,
Department of Earth Science and Engineering,
Imperial College London

More information about the petsc-users mailing list