<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 10:52 PM, Mani Chandra <span dir="ltr"><<a href="mailto:mc0710@gmail.com" target="_blank">mc0710@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the information. I'm familiar with SNES+DMDA, </div></blockquote><div><br></div><div>DMDA will not work with Chombo.  DMDA only works with uniform grids.  My two (base) classes do the transformations and linearizations for a 1) level solve and 2) full AMR solve, to a AIJ matrix.</div><div><br></div><div>I don't think you want to look at DMs.</div><div><br></div><div>Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">just not sure it would work with Chombo. But I'll give it a shot.<div><br></div><div>Cheers,</div><div>Mani</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 5:56 PM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Aug 12, 2015 at 2:29 PM, Mani Chandra <span dir="ltr"><<a href="mailto:mc0710@gmail.com" target="_blank">mc0710@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div><br></div></span><div>Chombo (me) creates an MPIAIJ matrix.  So <span style="color:rgb(80,0,80);font-size:12.8000001907349px">automatic Jacobian assembly should work.</span></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px"><br></span></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px">I have put a SNES in a Chombo code, but did not use </span><span style="color:rgb(80,0,80);font-size:12.8000001907349px">automatic Jacobian assembly.</span></div><span><font color="#888888"><div><span style="color:rgb(34,34,34)"></span></div></font></span></div></div></div></blockquote><div> </div></span><div>Do you have an example?</div></div></div></div></blockquote><div><br></div></span><div>If you want to make a SNES solver then you need an "apply" call back function and a way to map Chombo vectors with PETSc vectors.</div><div><br></div><div>Chombo has a level solver (classes derived from PetscSolver) and an AMR composite matrix constructor class (classes derived from PetscCompGrid) in lib/src/AMRElliptic.  These two class each create these maps, providing methods to "putChomboInPetsc", and so forth.  lib/src/AMRElliptic/PetscSolverI.H has an apply_mfree() method that is a callback function that you give to PETSc to apply an operator.  There are examples in Chombo on how to use/construct these two classes, or two installations of them.  Each of these classes has a Poisson and a 2D Viscous Tensor instantiation.</div><div><br></div><div>You probably want to look at PETSc SNES examples if you are not familiar with SNES to get an idea of what you need to provide.  Then, look at the appropriate Chombo class as a place start.  I am guessing that you will want to write your own solver and just use these classes to get these mapping methods.  Wrapping a Chombo operator (apply) and solver in a SNES is not hard and PetscSolverI.H has examples.</div><div><br></div><div>These codes only have one user each (and they are both ANAG staff members), so they are pretty immature codes.</div><div><br></div><div>Mark</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Thanks,</div><div>Mani </div></div></div></div>
</blockquote></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>