[petsc-users] Convert MatNest to MatAIJ

Thomas Witkowski thomas.witkowski at tu-dresden.de
Wed Oct 10 08:54:03 CDT 2012


No, I didn't miss Jed's point. I know exactly, what you are talking 
about. My point is, that I can either write a preamble of 100 lines, 
which nobody is interested in, why I MUST HAVE a MatNest in this case 
and than ask how to convert to a MatAIJ (as I mentioned, this conversion 
is for debugging only!), or I can just save my and your time and ask 
directly. But still thank you very much for spending your time to help 
me in using PETSc!!!

Thomas

Am 10.10.2012 15:48, schrieb Matthew Knepley:
> On Wed, Oct 10, 2012 at 9:45 AM, Thomas Witkowski 
> <thomas.witkowski at tu-dresden.de 
> <mailto:thomas.witkowski at tu-dresden.de>> wrote:
>
>     You are right. But what if a have a MATNEST and i must convert it
>     to MATAIJ. Any better way than what I wrote in my first mail?
>
>
> I think you miss Jed's point. You should NEVER have a MATNEST. You 
> should have a Mat. Its type
> should be determined by MatSetFromOptions(). If you want MATAIJ, you 
> give -mat_type aij, and if you
> want MATNEST, you give -mat_type nest.
>
>   Thanks,
>
>      Matt
>
>     Thomas
>
>     Am 10.10.2012 15:33, schrieb Jed Brown:
>>
>>     The best way, by far, is to assemble the matrix as AIJ if that is
>>     what you want to use. See MatGetLocalSubMatrix and SNES ex28.
>>     Using MATNEST should he a run-time choice.
>>
>>     On Oct 10, 2012 8:30 AM, "Thomas Witkowski"
>>     <thomas.witkowski at tu-dresden.de
>>     <mailto:thomas.witkowski at tu-dresden.de>> wrote:
>>
>>         Is there a fast way to convert a MatNest to a MatAIJ? I tried
>>         to use MatConvert, but it seems that this convert is not yet
>>         implemented. As I need this functionality to factorize the
>>         nested matrix with MUMPS, is there any better way than to
>>         extract the nested matrices, iterate over all rows of these
>>         matrices and use MatSetValues to add them again to the final
>>         MatAIJ?
>>
>>         Thomas
>>
>
>
>
>
> -- 
> 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/20121010/e0210320/attachment.html>


More information about the petsc-users mailing list