On Tue, Aug 28, 2012 at 11:18 AM, shu guo <greatgs2008 at gmail.com> wrote:
> So I have to define this submatrix and extract is into this pre-set > location? > No, you have to create an array to hold the Mat objects, e.g. Mat submats(10) > > 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. ;-) > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120828/44eda77a/attachment.html>
