For the sake of argument, why not get rid of all static types that inherit from PetscObject? Then everything in Mat, KSP, SNES, etc could use QueryFunction for dispatch.<div><br></div><div>My claim is that the relationship between DM and it's subtypes, from the user's perspective, is much more like the relationship between PetscObject and it's subtypes (e.g. Mat). There are some functions that operate on generic PetscObjects (e.g. PetscOList*, View, SetFromOptions), but most uses of Mat need to know statically that it is a Mat (not a KSP or some other PetscObject) in the same way that most uses (by users) of DA need to know statically that it is a DA and not some other DM.</div>
<div><br></div><div>This is why I prefer the more static inheritance model from PetscObject -> Mat for this purpose. What flexibility is being gained by using this new dynamic model?</div><div><br></div><div>Jed</div>