[petsc-users] How Can I scatter a global vector to a local vector without using DMGlobaltoLocalBegin/DMGlobaltoLocalEnd?

leejearl leejearl at mail.nwpu.edu.cn
Fri Jan 11 02:35:36 CST 2019


Hi, all Petscer:
  I am very sorry for disturbing you for my questions. I have a
problems as follow.
  1. A DMPlex object dm is created.
  2. A global vector and a local vector are created using the following
routines DMCreateGlobalVector and DMCreateLocalVector.
  3. I have initialed global Vector. Because the local vector have some
overlap cells, I want to scatter the data from global to local.
  4. If I don't use the routines
DMGlobaltoLocalBegin/DMGlobaltoLocalEnd, how can I scatter it? I have
scatter the vectors using VecScatterBegin and VecScatterEnd, and the IS
is created using the localId and the glolbalId (Obtained by
DMPlexGetCellNumbering). I got a wrong result.

  Can anyone give me some advices, and does it have some to do with the
natural ids?
  Any helps are approciated. Thanks. 





leejearl



More information about the petsc-users mailing list