further about MatGetSubMatrices()

Yujie recrusader at gmail.com
Wed Dec 24 14:14:13 CST 2008


Dear Barry:

I have solved my problem. If I need to do it according to my previous idea,
because the matrix is MPIDense, I can't find MatPermute() for MPIDense. I
have thought it didn't work in PETSc according to your suggestion.

Happy holiday!

Regards,

Yujie

On Wed, Dec 24, 2008 at 11:18 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> On Dec 23, 2008, at 5:36 PM, Yujie wrote:
>
>  Dear Matthew:
>>
>> The question is that I can't sort the IS. Because I need extract the
>> matrix according to the index of IS. I have tried to use MatPermute().
>> However, there is not MPIDense-based. I am wondering why MatGetSubMatrices()
>> need use the sorted IS.
>>
>>
>   Because its damn hard to do the getsubmatrices if they are not sorted.
>
>  Why not sort the IS in your call and then use that renumbering when it is
> needed in your code? An ordering is just a naming
> of each value so once it is sorted that is just giving you a new naming and
> you can use that new naming everywhere.
>
>   Barry
>
>  Thanks a lot.
>> Regards,
>>
>> Yujie
>>
>>
>> On Tue, Dec 23, 2008 at 2:06 PM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>> You can sort them with ISSort.
>>
>>  Matt
>>
>> On Tue, Dec 23, 2008 at 12:35 PM, Yujie <recrusader at gmail.com> wrote:
>> Hi, PETSc developer
>>
>> I am using MatGetSubMatrices() for my application. Because I need to exact
>> several matrices from the old one according to my index sets. These index
>> sets are not sorted. To MPIDense matrix, it didn't work. could you give me
>> some help? thanks a lot.
>>
>> Happy holiday:).
>>
>> Regards,
>>
>> Yujie
>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20081224/905e44be/attachment.htm>


More information about the petsc-users mailing list