[petsc-users] Accessing non-local values of a vector
Najeeb Ahmad
nahmad16 at ku.edu.tr
Mon Jun 18 10:05:54 CDT 2018
Thank you Satish. This is very helpful.
Regards,
On Mon, Jun 18, 2018 at 7:51 PM Satish Balay <balay at mcs.anl.gov> wrote:
> You would have to use VecScatter.
>
> http://www.mcs.anl.gov/petsc/documentation/faq.html#mpi-vec-access
>
> Satish
>
> On Mon, 18 Jun 2018, Najeeb Ahmad wrote:
>
> > Hi all,
> >
> > I am a novice user and I am trying to write my first project in PETSc. In
> > my code, I need to get vector values that may be residing on other
> > processes. I noticed that VecGetValues can get values on the same
> > processor. For instance, I need a calculation like this:
> >
> > temp = (dy(i) + dy(i + xmax)); /// xmax is length along x -
> > direction
> >
> > where dy(i + xmax) may be on another processes. What is the best way to
> > accomplish this?
> >
> > Thanks
> >
> >
>
>
--
*Najeeb Ahmad*
*Research and Teaching Assistant*
*PARallel and MultiCORE Computing Laboratory (ParCoreLab) *
*Computer Science and Engineering*
*Koç University, Istanbul, Turkey*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180618/941f0cdb/attachment.html>
More information about the petsc-users
mailing list