[petsc-dev] questions on new include organization

Jed Brown jedbrown at mcs.anl.gov
Tue Feb 12 23:45:42 CST 2013


On Tue, Feb 12, 2013 at 11:34 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>  Is it? Maybe a more general definition of PetscSection would be better as
> map from (int) -> IS   Matt's current usage is very restricted to only
> contiguous blocks of elements in a group. Need that be it? Should that be
> it?


There is some hackery to ascribe "field" structure to the output of the
map, but I'm skeptical of whether it belongs at this level.

The granularity is normally very small so we certainly don't want to pay
the memory or performance overhead of an IS for each output. Although I'm
sure we can think up scenarios where that flexibility would be useful, I
think generality in the outputs here would add significant complexity with
limited practical return.

Note that PetscSection is currently accessed using function calls in inner
loops. This already accounts for a noticeable amount of time for a CFD
application. So we either need a coarser grained access API or we need a
non-polymorphic accessor for use in hot access sites. (This is a rare case
where indirect function call overhead matters.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130212/b0212c51/attachment.html>


More information about the petsc-dev mailing list