[petsc-users] ISCreateStride and MatGetSubmatrices

shu guo greatgs2008 at gmail.com
Tue Aug 28 11:18:41 CDT 2012

So I have to define this submatrix and extract is into this pre-set location?

On Tue, Aug 28, 2012 at 12:03 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> 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. ;-)

More information about the petsc-users mailing list