<div dir="ltr"><div class="gmail_default" style="font-size:small">I am trying to solve a system of nonlinear equations in many variables which are sparsely coupled and represent a field on a structured grid, and one variable which is coupled to all variables.  I've been using a DMRedundant for the fully-coupled variable, a DMDA for the other variables, and a DMComposite to combine the two and create the matrices and vectors for the nonlinear solver.  This works, but I am having difficulty improving the performance.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">My question concerns using multigrid methods with such a setup.  The problem can be formulated so that it coarsens properly, i.e. the function can be written so that it meets the Galerkin condition, and I can calculate the Jacobian for the coarse grid, etc.  My issue is that I don't see how to tell PETSc how to actually perform the coarsening.  If I just use SNESSetDM with the DMComposite, then I can't use FAS for the SNES or MG for the PC because PETSc doesn't know how to coarsen the DM.  I'm hoping there is some way to get this to work, perhaps using a shell - any tips?</div><div class="gmail_default" style="font-size:small"><br></div></div>