[petsc-dev] Getting "from" and "to" IS from a VecScatter

Blaise Bourdin bourdin at lsu.edu
Wed Jun 20 18:19:34 CDT 2012


Hi,

I need to reconstruct the IS that were used to build a VecScatter between a local and a global Vec. 

From what I see in VecScatterView_MPI (vpscat.c:13), it looks like I can get the indices from from->local.vslots[i],to->local.vslots[i], i=0 .. i<to->local.n where from and to are obtained with
  VecScatter_MPI_General *to=(VecScatter_MPI_General*)ctx->todata;
  VecScatter_MPI_General *from=(VecScatter_MPI_General*)ctx->fromdata;

From there, constructing the IS is trivial. Is there a way that does not involve poking inside the VecScatter data structure?

Blaise


-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin










More information about the petsc-dev mailing list