Thank you. I just have a coupled problem, and i want to solve it beginning with stagger then couple.
Matthew Knepley <[email protected]> 於 2019年4月30日 週二 下午12:57寫道: > On Tue, Apr 30, 2019 at 1:20 PM Josh L via petsc-users < > [email protected]> wrote: > >> Hi, >> >> I have a DM that that has 2 sections: >> >> section_0 has 2 dofs: u, v >> section_1 has 1 dofs: p >> >> and a SubDM created by DMCreateSubDM. SubDM only has section_1. >> >> There are a global vector created with DM, and a local vector created >> with SubDM >> >> Can I do GlobalToLocal between this 2 vectors? >> > > No, the global and local vector have to have the same DM. > > If yes, which DM should I use when calling GlobalToLocal. >> >> Basically, I want >> a global vec: [u1, v1, p1 u2, v2, p2, u3, v3, p3......] >> to >> local vec: [all dof p that belongs to this processor] >> > > You will have to do it in two steps, either, > > 1) Extract p in a subDM, and then do G2L on that > > or > > 2) Do G2L on the full DM, and then extract p from the local vec > > 1) sounds better to me, but I do not know what your code is doing. > > Thanks, > > Matt > > >> >> Thanks, >> Yu-Sheng >> >> >> >> >> >> > > -- > 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/> >
