[petsc-users] Build a PETSc matrix with "ghost lines" ?

Barry Smith bsmith at mcs.anl.gov
Thu Dec 10 11:14:22 CST 2015


> On Dec 10, 2015, at 11:06 AM, PEYROUNETTE Myriam <myriam.peyrounette at imft.fr> wrote:
> 
> Hi all,
> 
> I am partitioning an unstructured network in order to parallelize my code. To communicate some node data between processors, I have to deal with ghost values. I know PETSc allows its vectors to carry ghost values thanks to VecCreateGhost() or VecMPISetGhost() functions. In the same spirit, are there similar functions to create matrix with ghost lines ?
> 
> To give an example : I have a matrix containing the coordinates of each node and I would like to access the coordinates of a neighboring node, even if it is located on a different processor.

   You would never use a Mat to store coordinates. Use a Vec (with a bs of 2 or 3 if in 2 or 3 dimensions) 

   Barry

> 
> Thanks,
> Myriam



More information about the petsc-users mailing list