[petsc-dev] DM interface versus implementation headers

Jed Brown jed at 59A2.org
Sun Mar 13 13:54:29 CDT 2011


The solvers all have DM members now, but they only depend on the generic DM
interface. Currently all of DMDA and now DMMesh are piled into petscdm.h
which means that all the solvers need to be rebuilt any time these
implementations change (e.g. a new implementation-specific function is
added). The user already needs to decide which DM to use (DMDA, DMMesh, etc)
so it would be no hardship to include petscdmda.h instead of just petscdm.h.
For user-defined implementations of DM, this is already necessary.

In order to loosen the dependency of the solvers on DM, I propose distilling
petscdm.h to be only the core DM functionality (roughly what is in _DMOps)
and creating petscdmda.h and petscdmmesh.h for the DMDA* and DMMesh*
functions. Note that there is already some precedence for this in petscmg.h
(which perhaps should be named petscpcmg.h), though I think the case for
separation is much stronger for DM.

If this change is going to happen, it should be before the release.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110313/6551590b/attachment.html>


More information about the petsc-dev mailing list