VecGetValues and tutorail?

Satish Balay balay at
Fri Feb 24 11:56:45 CST 2006

On Fri, 24 Feb 2006, billy at wrote:

> Hello,
> "VecGetValues - Gets values from certain locations of a vector. Currently can
> only get values on the same processor"
> How can I get a value of the vector belonging to a different processor?
> I am trying to learn how to adapt my code to work in parallel. Have looked at
> src/snes/examples/tutorials/ex10d/ex10.c, but I am still confused on how to use
> petsc with unstructured meshes. Is there any simple step-by-step tutorial?

Basically - you'll have to use VecScatter routines to specify the
communication required. Then use VecScatterBegin/End() to invoke this
communication. Some of this info is in the tutorial slides [check
arround slide 150] in:

Not usre if there is an unstructured grid example code. [but there are
examples using VecScatters in src/dm/da/examples/tutorials]


More information about the petsc-users mailing list