I am trying to fill a vector based on global coordinate. As I am trying to use VecGetValues() on the global coordinate, I find it that argument goes out of range, since I am using global numbering rather than local numbering.
From: Matthew Knepley [mailto:knep...@gmail.com] Sent: Wednesday, March 21, 2018 10:38 PM To: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn> Cc: PETSc <petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] Global Numbering On Wed, Mar 21, 2018 at 8:18 AM, Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn <mailto:mhbagh...@mail.sjtu.edu.cn> > wrote: Hello I am trying to create a global vector of coordinates based on the parallelized dm. I find it really hard to work with the local numbering, how can I manage to create a kind of numbering on global level so that I could easily access to the nodes based on the new numbering. Thanks for your time. DMGetCoordinates() gives you a global vector. DMGetCoordinatesLocal() gives you a local vector. What are you trying to do? Thanks, Matt Amir -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>