[petsc-users] [2]PETSC ERROR: MatPermute not available for Mat type mpiaij!
Barry Smith
bsmith at mcs.anl.gov
Mon Sep 16 11:19:39 CDT 2013
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">
More information about the petsc-users
mailing list