On Sep 9, 2013, at 3:14 PM, Jed Brown <jedbr...@mcs.anl.gov> wrote: > Barry Smith <bsm...@mcs.anl.gov> writes: >> How about fixing this? Agreed we should not be requiring people to >> use MatShell to do this stuff but it sounds you want to work around >> a current design flaw with PCMG by using PCMGSetResidual. Why not >> fix the design flaw? > > What is the "correct" way to compute coarse operators when the user > wants part Galerkin and part rediscretization? The user's > (non-Galerkin) matrix assembly function has both Mat slots, and they'll > need to know which one to ignore when PCMG configuration says to make > one or the other Galerkin.
I don't buy this as being a difficult as you make out. We could allow the user to indicate which "slot" they want to be used with a PCMG Galerkin computed and then they know the other one is the one they provide their own operator for. I don't care if PCMGSetResidual stays around for now but I do not think we should "point to it" as a standard way for people to do things; I think we should improve how the two slots are used with PCMG, it really has never been thought about at all and whenever possible I think using the two slots appropriately is better than PCMGSetResidual and will solve most of the "use" cases. Barry > > I don't know what is really a good interface for this. PCMGSetResidual > doesn't seem that inconvenient to me. (Sure, it's not as nicely > recursive and nestable as you might like in an idealized world, but > matrix-free MG implementations for real problems usually have lots of > constraints anyway.)