[petsc-users] PETSc / AMRex

Pierre Bernigaud pierre.bernigaud at onera.fr
Wed Jun 22 12:50:26 CDT 2022


Thank you for this roadmap. It should be doable to go from a DMDA to a 
DMPLex code.
I wasn't aware of the existence of p4est. From what I've seen, it should 
fulfil our needs.

I will contact you again if we encounter any trouble.

Thanks again,

Le 2022-06-21 19:57, Mark Adams a écrit :

> (keep on the list, you will need Matt and Toby soon anyway).
> So you want to add AMRex to your code.
> I think the first thing that you want to do is move your DMDA code into 
> a DMPLex code. You can create a "box" mesh and it is not hard.
> Others like Matt can give advice on how to get started on that 
> translation.
> There is a simple step to create a DMForest (p4/8est) that Matt 
> mentioned from the DMPlex .
> Now at this point you can run your current SNES tests and get back to 
> where you started, but AMR is easy now.
> Or as easy as it gets.
> As far as AMRex, well, it's not clear what AMRex does for you at this 
> point.
> You don't seem to have AMRex code that you want to reuse.
> If there is some functionality that you need then we can talk about it 
> or if you have some programmatic reason to use it (eg, they are paying 
> you) then, again, we can talk about it.
> PETSc/p4est and AMRex are similar with different strengths and design, 
> and you could use both but that would complicate things.
> Hope that helps,
> Mark
> On Tue, Jun 21, 2022 at 1:18 PM Bernigaud Pierre 
> <pierre.bernigaud at onera.fr> wrote:
> Hello Mark,
> We have a working solver employing SNES, to which is attached a DMDA to 
> handle ghost cells / data sharing between processors for flux 
> evaluation (using DMGlobalToLocalBegin / DMGlobalToLocalEnd) . We are 
> considering to add an AMReX layer to the solver, but no work has been 
> done yet, as we are currently evaluating if it would be feasible 
> without too much trouble.
> Our main subject of concern would be to understand how to interface 
> correctly PETSc (SNES+DMDA) and AMRex, as AMRex also appears to have 
> his own methods for parallel data management. Hence our inquiry for 
> examples, just to get a feel for how it would work out.
> Best,
> Pierre
> Le 21/06/2022 à 18:00, Mark Adams a écrit :
> Hi Bernigaud,
> To be clear, you have SNES working with DMDA in AMRex, but without 
> adapting dynamically and you want to know what to do next.
> Is that right?
> Mark
> On Tue, Jun 21, 2022 at 11:46 AM Bernigaud Pierre 
> <pierre.bernigaud at onera.fr> wrote: Greetings,
> I hope you are doing great.
> We are currently working on parallel solver employing PETSc for the 
> main
> numerical methods (GMRES, Newton-Krylov method). We would be interested
> in combining the PETSc solvers with the AMR framework provided by the
> library AMReX (https://amrex-codes.github.io/amrex/). I know that 
> within
> the AMReX framework the KSP solvers provided by PETSc can be used, but
> what about the SNES solvers? More specifically, we are using a DMDA to
> manage parallel communications during the SNES calculations, and I am
> wondering how it would behave in a context where the data layout 
> between
> processors is modified by the AMR code when refining the grid.
> Would you have any experience on this matter ? Is there any
> collaboration going on between PETsc and AMReX, or would you know of a
> code using both of them?
> Respectfully,
> Pierre Bernigaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220622/fc2efe39/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jlgjjjnkhffoclfc.gif
Type: image/gif
Size: 1041 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220622/fc2efe39/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dldmcfkmcojhebgb.png
Type: image/png
Size: 16755 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220622/fc2efe39/attachment.png>

More information about the petsc-users mailing list