[petsc-users] Get global offset in global vector for the points not owned by this processor.

Matthew Knepley knepley at gmail.com
Mon May 29 19:40:05 CDT 2023


On Mon, May 29, 2023 at 5:47 PM YuSh Lo <ysjosh.lo at gmail.com> wrote:

> Hi,
>
> How to get the offset in global vector for the points not owned by this
> processor?
> I have a parallel DMPlex and a section assigned to it.
> GetSectionGetOffset with a global section returns -1 for the points not
> owned by this processor.
>

The easiest way to get it is to use DMGetLocalToGlobalMapping() to map the
local offset. This is
constructed from the global section, because it stores the global offset as
-(offset+1).

  Thanks,

     Matt


> Thanks,
> Josh
>
>

-- 
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.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230529/1acba051/attachment.html>


More information about the petsc-users mailing list