[petsc-users] ISCreateStride and MatGetSubmatrices

Jed Brown jedbrown at mcs.anl.gov
Tue Aug 28 11:03:51 CDT 2012


On Tue, Aug 28, 2012 at 10:56 AM, shu guo <greatgs2008 at gmail.com> wrote:

> Hi All,
>
> I think I made a mistake. It seems it crashes when I call the command
> of MatGetSubMatrices. There is an indication that saying,
>
>  MatGetSubmatrices() is slightly different from C since the
>      Fortran provides the array to hold the submatrix objects,while in C
> that
>      array is allocated by the MatGetSubmatrices()
>
> What does this mean? I don't even need this command to extract the
> submatrix?
>

It means that you have to allocate the array to hold the result.

If this seems cumbersome to you, ask yourself why you chose to write in
Fortran. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120828/bcfdac7d/attachment.html>


More information about the petsc-users mailing list