Hi Pierre - there's still development going on with DMStag and block PCs, so if you don't find the example you're looking for, please let me know.
Best, Patrick > Am 13.10.2019 um 20:11 schrieb Pierre Gubernatis via petsc-users > <[email protected]>: > > Thanks Matt, I Hope I can find a simple example of these DMStags... > I'll start with the linear stage of our algorithm (a Newton iteration used > for minimizing a residual). Next I will consider giving the whole non linear > problem to petsc... > Regards. > > Le dim. 13 oct. 2019 à 19:00, <[email protected] > <mailto:[email protected]>> a écrit : > Send petsc-users mailing list submissions to > [email protected] <mailto:[email protected]> > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mcs.anl.gov/mailman/listinfo/petsc-users > <https://lists.mcs.anl.gov/mailman/listinfo/petsc-users> > or, via email, send a message with subject or body 'help' to > [email protected] > <mailto:[email protected]> > > You can reach the person managing the list at > [email protected] <mailto:[email protected]> > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of petsc-users digest..." > > > Today's Topics: > > 1. Using petsc with an existing domain decomposition. > (Pierre Gubernatis) > 2. Re: Using petsc with an existing domain decomposition. > (Matthew Knepley) > 3. Re: Using petsc with an existing domain decomposition. > (Mark Adams) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 13 Oct 2019 11:24:04 +0200 > From: Pierre Gubernatis <[email protected] > <mailto:[email protected]>> > To: [email protected] <mailto:[email protected]> > Subject: [petsc-users] Using petsc with an existing domain > decomposition. > Message-ID: > <CAAiXahKb8tQ1csBd0nkVXfJzZcDsJfWJ9ir=s3htogczcwm...@mail.gmail.com > <mailto:[email protected]>> > Content-Type: text/plain; charset="utf-8" > > Hello all, > > It souds that the best way to introduce petsc in a code is not to introduce > it, but develop the code over the petsc structure. > > It is probably true but my problem is that my existing code already is > equipped with a domain decomposition based on MPI (a typical themal > hydraulic with cartesian staggered mesh) > > The user can slice the domain in sub-domains and construct a linear problem > by block: each sub-domain assembles its part of the operator and its part > of the RHS. > > I am wondering what is the best way now to introduce petsc (considering > that I don?t want to assemble a global operator on a given proc). Is there > an example that would show how to introduce petsc in this situation ? > Thank you, Pierre > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191013/d7d41233/attachment-0001.html > > <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191013/d7d41233/attachment-0001.html>> > > ------------------------------ > > Message: 2 > Date: Sun, 13 Oct 2019 07:22:27 -0400 > From: Matthew Knepley <[email protected] <mailto:[email protected]>> > To: Pierre Gubernatis <[email protected] > <mailto:[email protected]>> > Cc: PETSc <[email protected] <mailto:[email protected]>> > Subject: Re: [petsc-users] Using petsc with an existing domain > decomposition. > Message-ID: > <CAMYG4G=nxz+=2cs26wnrx3eyqezncvkfx7yctr_dkgfskqr...@mail.gmail.com > <mailto:[email protected]>> > Content-Type: text/plain; charset="utf-8" > > Without having seen your code, it sounds to me like the best strategy here > is to: > > 1) Produce a mirror of your mesh using DMStag > > 2) Use that DM to construct the linear block problems, which can then be > solved by PETSc > > Since the PETSc grid matches your own, you can share the solution > vectors between your code and PETSc, > so it will fit nicely into your existing structure. > > Once that works, if the entire mesh is Cartesian, you could use DMStag to > model that and let PETSc handle parallel > decomposition. At the same stage, you could decide to let PETSc SNES handle > the nonlinear problem, rather than > just the linear parts. > > Thanks, > > Matt > > On Sun, Oct 13, 2019 at 5:25 AM Pierre Gubernatis via petsc-users < > [email protected] <mailto:[email protected]>> wrote: > > > Hello all, > > > > It souds that the best way to introduce petsc in a code is not to > > introduce it, but develop the code over the petsc structure. > > > > It is probably true but my problem is that my existing code already is > > equipped with a domain decomposition based on MPI (a typical themal > > hydraulic with cartesian staggered mesh) > > > > The user can slice the domain in sub-domains and construct a linear > > problem by block: each sub-domain assembles its part of the operator and > > its part of the RHS. > > > > I am wondering what is the best way now to introduce petsc (considering > > that I don?t want to assemble a global operator on a given proc). Is there > > an example that would show how to introduce petsc in this situation ? > > Thank you, Pierre > > > > > -- > 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/ <https://www.cse.buffalo.edu/~knepley/> > <http://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/20191013/59f371e0/attachment-0001.html > > <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191013/59f371e0/attachment-0001.html>> > > ------------------------------ > > Message: 3 > Date: Sun, 13 Oct 2019 09:56:58 -0400 > From: Mark Adams <[email protected] <mailto:[email protected]>> > To: Pierre Gubernatis <[email protected] > <mailto:[email protected]>> > Cc: PETSc users list <[email protected] > <mailto:[email protected]>> > Subject: Re: [petsc-users] Using petsc with an existing domain > decomposition. > Message-ID: > <CADOhEh7PhC+SG_kDYd2gdPMMuvHacYBx+nGt=en0wgesolf...@mail.gmail.com > <mailto:[email protected]>> > Content-Type: text/plain; charset="utf-8" > > On Sun, Oct 13, 2019 at 5:25 AM Pierre Gubernatis via petsc-users < > [email protected] <mailto:[email protected]>> wrote: > > > Hello all, > > > > It souds that the best way to introduce petsc in a code is not to > > introduce it, but develop the code over the petsc structure. > > > > All things being equal, yes, but few users start with PETSc from scratch. > You situation is normal and Matt's suggestion of mirroring your mesh in > PETSc mesh object (DM) is a common approach. > > > > It is probably true but my problem is that my existing code already is > > equipped with a domain decomposition based on MPI (a typical themal > > hydraulic with cartesian staggered mesh) > > > > The user can slice the domain in sub-domains and construct a linear > > problem by block: each sub-domain assembles its part of the operator and > > its part of the RHS. > > > > I am wondering what is the best way now to introduce petsc (considering > > that I don?t want to assemble a global operator on a given proc). Is there > > an example that would show how to introduce petsc in this situation ? > > Thank you, Pierre > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191013/f9219b2b/attachment-0001.html > > <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191013/f9219b2b/attachment-0001.html>> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > petsc-users mailing list > [email protected] <mailto:[email protected]> > https://lists.mcs.anl.gov/mailman/listinfo/petsc-users > <https://lists.mcs.anl.gov/mailman/listinfo/petsc-users> > > > ------------------------------ > > End of petsc-users Digest, Vol 130, Issue 43 > ********************************************
