On Wed, Aug 12, 2015 at 10:52 PM, Mani Chandra <[email protected]> wrote:
> Thanks for the information. I'm familiar with SNES+DMDA, > 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. I don't think you want to look at DMs. Mark > just not sure it would work with Chombo. But I'll give it a shot. > > Cheers, > Mani > > On Wed, Aug 12, 2015 at 5:56 PM, Mark Adams <[email protected]> wrote: > >> >> >> On Wed, Aug 12, 2015 at 2:29 PM, Mani Chandra <[email protected]> wrote: >> >>> Hi, >>> >>> >>>> Chombo (me) creates an MPIAIJ matrix. So automatic Jacobian assembly >>>> should work. >>>> >>>> I have put a SNES in a Chombo code, but did not use automatic Jacobian >>>> assembly. >>>> >>> >>> Do you have an example? >>> >> >> 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. >> >> 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. >> >> 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. >> >> These codes only have one user each (and they are both ANAG staff >> members), so they are pretty immature codes. >> >> Mark >> >> >>> Thanks, >>> Mani >>> >> >> >
