<div dir="ltr">Hi, PETSc developers,<div><br></div><div>1. Consider solving a linear problem with -pc_type mg, assembling the matrix using KSPSetComputeOperators(ksp,ComputeMatrix,&user) and MatSetValuesStencil as in ksp ex25.c.  I’d like Pmat to be different than Amat (a stable low-order discretization and a high-order discretization, respectively.) However the two Mat arguments that PETSc passes to ComputeMatrix appear to be the same object, so Pmat and Amat are forced to be the same.  (For example in ex25, J==jac). How do I allow Amat and Pmat to differ?</div><div><br></div><div>2. I suppose if the above issue were resolved, the resulting gmres/mg iteration would amount to doing defect correction on only the finest grid. Another defect correction method is to use a different Mat for smoothing and residual computation at every level. (Stable low-order for smoothing, high-order for residual.) This latter approach is recommended on page 103 of Brandt’s multigrid guide (<a href="http://www.wisdom.weizmann.ac.il/~achi/classics.pdf">http://www.wisdom.weizmann.ac.il/~achi/classics.pdf</a>). What would be the best way to do this second kind of defect correction in PETSc mg? Perhaps loop over every multigrid level and call PCMGSetResidual(pc,l,PCMGResidualDefault,Amat) on each level, after calling ComputeMatrix to build the appropriately-sized Amat?</div><div><br></div><div>3. Is it at all sensible to do this second kind of defect correction with _algebraic_ multigrid? Perhaps Amat for each level could be formed from the high-order matrix at the fine level by the Galerkin operator R A P, after getting all the restriction matrices created by gamg for Pmat?</div><div><br></div><div>Thanks,</div><div>Matt Landreman</div></div>