[petsc-dev] major changes to DA in PETSc-dev

Jed Brown jed at 59A2.org
Mon Oct 18 08:27:27 CDT 2010

On Mon, Oct 18, 2010 at 15:17, Barry Smith <bsmith at mcs.anl.gov> wrote:

> The lack of the runtime "checking" (actually using the Queryfunction
> business like KSPGMRESSetRestart()) is only due to lazyness on my part, not
> design. Eventually all the DMDAXXX() will use the query and thus have the
> runtime checking.

1. I'm aware that it is not by design.

2. Some people call simple DA query functions in inner loops (due to
granularity of their FEM interfaces, for example).  The string comparison of
the queries would eventually become expensive in this case.

3. More importantly, the user knows they have a DA when they call
DMDAGetLocalInfo, they are relying on all sort of details about its
structure when they write their loops.  I do not see any advantage to
eschewing static checking here, or to redoing the downcast in each of these
specialized calls.

As with KSPGMRESSetRestart() there is no compile time checking.

I do not think this is a good thing with implementations of DM, they are
used differently.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101018/4bca4f7e/attachment.html>

More information about the petsc-dev mailing list