[petsc-users] [2]PETSC ERROR: MatPermute not available for Mat type mpiaij!

丁老师 ztdepyahoo at 163.com
Mon Sep 16 19:17:26 CDT 2013


Daer Barry:
    Matrix A is the coeffcients not the mesh. I use the MatPermute following the ksp examples in dev version ex18. 
After the line 77, we declared a parallel matrix , at line 78, we declare a seq matrix.
so what is this seq matrix for ?
 77: MatMPIAIJSetPreallocation(A,5,NULL,5,NULL);
 78: MatSeqAIJSetPreallocation(A,5,NULL);









At 2013-09-17 00:19:39,"Barry Smith" <bsmith at mcs.anl.gov> wrote:
>
>   I assume that his matrix A is suppose to represent the connections in the mesh.
>
>   1) You only want to reorder the mesh locally (assuming you have already partitioned the mesh in parallel for good load balancing and low number of cut eges) so each process will call MatCreate() with PETSC_COMM_SELF and each set a matrix associated only with the local part of the mesh.
>
>   2) You don't want to use MatPermute() rather you would use MatGetOrdering() which tells you how to reorder the unknowns on the mesh on each process.  For the ordering I think you want to use MATORDERINGRCM. Now you just renumber the mesh nodes on each process and update the the ghost node information to reflect the new ordering.
>
>   Barry
>
>
>On Sep 16, 2013, at 7:14 AM, 丁老师 <ztdepyahoo at 163.com> wrote:
>
>> i set up my matrix A with 
>>   MatCreate(PETSC_COMM_WORLD,&A);
>>   MatSetSizes(A,PMesh->LocalSize,PMesh->LocalSize,PETSC_DECIDE,PETSC_DECIDE);
>>   MatSetFromOptions(A);
>>   MatMPIAIJSetPreallocation(A,5,PETSC_NULL,5,PETSC_NULL);
>> 
>> 
>> then which type should i use to support the matpermute.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> < span title="neteasefooter">
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130917/6bb24eb2/attachment.html>


More information about the petsc-users mailing list