How to map global vector to natural vector
Dear PETSc Team, I am working with petsc4py for my model. I had some experience of using PETSc in Fortran. In Fortran, I used the following subroutines: call DMPlexCreateNaturalVector(dm, natural, ierr) call DMPlexNaturalToGlobalBegin(dm,natural,X,ierr) call DMPlexNaturalToGlobalEnd(dm,natural,X,ierr) However, I found there are no such interfaces in petsc4py. Can you advise me on how to get the global vector in natural order with DMPLEX in petsc4py? Thanks, Donghui
I will fix it. Thanks, Matt On Tue, Oct 21, 2025 at 12:09 PM Xu, Donghui via petsc-users < [email protected]> wrote:
Dear PETSc Team,
I am working with petsc4py for my model. I had some experience of using PETSc in Fortran. In Fortran, I used the following subroutines:
call DMPlexCreateNaturalVector(dm, natural, ierr) call DMPlexNaturalToGlobalBegin(dm,natural,X,ierr) call DMPlexNaturalToGlobalEnd(dm,natural,X,ierr)
However, I found there are no such interfaces in petsc4py. Can you advise me on how to get the global vector in natural order with DMPLEX in petsc4py?
Thanks, Donghui
-- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
Here is the MR: https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/8... Thanks, Matt On Tue, Oct 21, 2025 at 4:24 PM Matthew Knepley <[email protected]> wrote:
I will fix it.
Thanks,
Matt
On Tue, Oct 21, 2025 at 12:09 PM Xu, Donghui via petsc-users < [email protected]> wrote:
Dear PETSc Team,
I am working with petsc4py for my model. I had some experience of using PETSc in Fortran. In Fortran, I used the following subroutines:
call DMPlexCreateNaturalVector(dm, natural, ierr) call DMPlexNaturalToGlobalBegin(dm,natural,X,ierr) call DMPlexNaturalToGlobalEnd(dm,natural,X,ierr)
However, I found there are no such interfaces in petsc4py. Can you advise me on how to get the global vector in natural order with DMPLEX in petsc4py?
Thanks, Donghui
-- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
-- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
Thank you, Matt! From: Matthew Knepley <[email protected]> Date: Thursday, November 13, 2025 at 1:28 PM To: Xu, Donghui <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: [petsc-users] How to map global vector to natural vector Check twice before you click! This email originated from outside PNNL. Here is the MR: https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/8... Thanks, Matt On Tue, Oct 21, 2025 at 4:24 PM Matthew Knepley <[email protected]<mailto:[email protected]>> wrote: I will fix it. Thanks, Matt On Tue, Oct 21, 2025 at 12:09 PM Xu, Donghui via petsc-users <[email protected]<mailto:[email protected]>> wrote: Dear PETSc Team, I am working with petsc4py for my model. I had some experience of using PETSc in Fortran. In Fortran, I used the following subroutines: call DMPlexCreateNaturalVector(dm, natural, ierr) call DMPlexNaturalToGlobalBegin(dm,natural,X,ierr) call DMPlexNaturalToGlobalEnd(dm,natural,X,ierr) However, I found there are no such interfaces in petsc4py. Can you advise me on how to get the global vector in natural order with DMPLEX in petsc4py? Thanks, Donghui -- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... > -- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
participants (2)
-
Matthew Knepley -
Xu, Donghui