Barry Smith <bsm...@mcs.anl.gov> writes: > I don't see the advantage of keeping the PCMGSetResidual. It seems > to me that using the Amat to properly manage the different operator > approximations is the clean right way to do it. Messing with shoving > a random residual computer function seems prone to errors and > confusion about what operator is what. So is there a particular > case where using the hierarchy of Amat and Pmat won't work but > PCMGSetResidual will?
Suppose the user is doing geometric multigrid with defect correction (high order residual, low-order correction) where the low order thing is Galerkin and the high-order is an expensive matrix-free rediscretization. The PCMG Galerkin code currently only handles when Amat and Pmat are the same on coarse levels, so where would the user put the code for the high-order residual? It's not that we can't provide directions to work around this (create MatShells, set their residual, and put them on appropriate levels, then make sure that PCSetUp_MG does not overwrite Amat on coarse levels), but I don't see PCMGSetResidual as being expensive for us to maintain and it fits a lot of folks' mental picture of how matrix-free MG works. What is the tangible value in deleting it (and breaking folks' code)?
pgpoiZEKBn4iq.pgp
Description: PGP signature