On Sun, Jun 18, 2023 at 2:12 AM YuSh Lo <ysjosh...@gmail.com> wrote:
> I am getting a null PetscSF after calling DMPlexGetGlobalToNatural > Did you call DMDIstribute()? This is where the map is created because until then, the map is identity. Thanks, Matt > YuSh Lo <ysjosh...@gmail.com> 於 2023年6月18日 週日 上午12:18寫道: > >> Hi Matthew, >> >> After setting DMSetUseNatural to true and calling >> DMPlexGetGlobalToNatural, >> I call PestcSFView right away, it gives segmentation fault. >> I have also tried DMGetNaturalSF, it also gives segmentation fault when >> calling PetscSFView. >> I use PETSC_VIEWER_STDOUT_WORLD as PetscViewer >> >> Thanks, >> Josh >> >> >> Matthew Knepley <knep...@gmail.com> 於 2023年6月9日 週五 下午1:04寫道: >> >>> On Fri, Jun 9, 2023 at 1:46 PM YuSh Lo <ysjosh...@gmail.com> wrote: >>> >>>> Hi Barry, >>>> >>>> Is there any way to use the mapping generated by DMPlexDistribute along >>>> with AO? >>>> >>> >>> For Plex, if you turn on >>> >>> https://petsc.org/main/manualpages/DM/DMSetUseNatural/ >>> >>> before DMPlexDistribute(), it will compute and store a GlobalToNatural >>> map. This can be >>> used to map vectors back and forth, but you can extract the SF >>> >>> DMPlexGetGlobalToNaturalSF >>> <https://petsc.org/main/manualpages/DMPlex/DMPlexGetGlobalToNaturalSF/> >>> >>> and use that to remap your IS, by extracting the indices. >>> >>> THanks, >>> >>> Matt >>> >>> >>>> Thanks, >>>> Josh >>>> >>>> >>>> Barry Smith <bsm...@petsc.dev> 於 2023年6月9日 週五 上午10:42寫道: >>>> >>>>> >>>>> You might be looking for >>>>> https://petsc.org/release/manualpages/AO/AO/#ao >>>>> >>>>> >>>>> On Jun 9, 2023, at 11:02 AM, Mark Adams <mfad...@lbl.gov> wrote: >>>>> >>>>> An IS is just an array of integers. We need your context. >>>>> Is this question for sparse matrices? If so look at the documentation >>>>> on the AIJ matrix construction and the global vertex numbering system. >>>>> >>>>> Mark >>>>> >>>>> On Thu, Jun 8, 2023 at 1:15 PM YuSh Lo <ysjosh...@gmail.com> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I have an IS that contains some vertex that is in natural numbering. >>>>>> How do I map them to global numbering without being distributed? >>>>>> >>>>>> 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/> >>> >> -- 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/>