Re: [petsc-users] How to fetch right values of a local vector

2024-02-23 Thread 袁煕
Great! I got the right answer now after adding MSetSectionSF(dm, PETSC_NULL_SF, ierr) . Thanks for your help! 2024年2月24日(土) 0:09 Matthew Knepley : > On Fri, Feb 23, 2024 at 9:54 AM 袁煕 wrote: > >> Hello, I cannot fetch right values of a local vector after a second time >> calling DMSetLocalSe

Re: [petsc-users] How to fetch right values of a local vector

2024-02-23 Thread Matthew Knepley
On Fri, Feb 23, 2024 at 9:54 AM 袁煕 wrote: > Hello, I cannot fetch right values of a local vector after a second time > calling DMSetLocalSection. My program runs like call > PetscSectionSetup(section1,ierr) call > DMSetLocalSection(dm_mesh,section1,ierr)call > PetscSection

[petsc-users] How to fetch right values of a local vector

2024-02-23 Thread 袁煕
Hello, I cannot fetch right values of a local vector after a second time calling DMSetLocalSection. My program runs like call PetscSectionSetup(section1,ierr) call DMSetLocalSection(dm_mesh,section1,ierr) call PetscSectionDestroy(section1,ierr) call DMCreateGlobalVector(dm_