[petsc-users] Scatter context for MatMult
John Fettig
john.fettig at gmail.com
Fri Aug 17 13:48:12 CDT 2012
On Fri, Aug 17, 2012 at 2:33 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Why do you want raw access?
I'm trying to write my own RAP operator for AMG.
> If you really need, you can either use MatMPIAIJGetSeqAIJ() or just include
> the private header.
I presume you mean MatMPIAIJGetLocalMat. This isn't quite what I
want. I don't want the local matrix, I want to scatter a vector
according to the ghost values defined by the sparsity pattern of the
parallel matrix.
Could you give me a little more help with using the latter? I see
VecScatterBegin(a->Mvctx,xx,a->lvec,INSERT_VALUES,SCATTER_FORWARD);
(*a->A->ops->mult)(a->A,xx,yy);
VecScatterEnd(a->Mvctx,xx,a->lvec,INSERT_VALUES,SCATTER_FORWARD);
(*a->B->ops->multadd)(a->B,a->lvec,yy,yy);
So I guess a->Mvctx is what I want. How do I figure out the mapping
of indices in a->lvec?
John
More information about the petsc-users
mailing list