[petsc-users] Convert mat SEQAIJ to MPIAIJ

Hong Zhang hzhang at mcs.anl.gov
Mon Sep 3 11:02:06 CDT 2012


Thomas :

> In my FETI-DP code, each rank creates a SEQAIJ matrix that represents the
> discretization of the interior domain. Just for debugging, I would like to
> join these sequential matrices to one global MPIAIJ matrix. This matrix has
> no off diagonal nnzs and should be stored corresponding to the ranks
> unknowns, thus, first all rows of the first rank and so on. What's the most
> efficient way to do this? Is it possible to create this parallel matrix
> just as a view of the sequential ones, so without copying the data? Thanks
> for any advise.


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJConcatenateSeqAIJ.html

Note: entries in seqaij matrices are copied into a mpiaij matrix without
inter-processor communication. Use petsc-3.3 for this function.

Hong

>
>
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120903/aa2f5cc2/attachment.html>


More information about the petsc-users mailing list