And yet DMDA already defines this local fine-granularity "stencil" access.<div>Where would it go, if not in the DM?  In my opinion this is part of the function space definition:</div><div>it generalizes VecGetArray to something more geometric.</div>

<div>Not all DMs have to implement this.<br><br><div class="gmail_quote">On Tue, Dec 7, 2010 at 3:35 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="gmail_quote"><div class="im">On Tue, Dec 7, 2010 at 22:06, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>></span> wrote:<br></div><div class="im">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>But those that *want* to know, can obtain the underlying DM and start doing cool stuff</div><div>to the Vec.   In particular, DM is the natural place to inject geometric information, generalizing DMDA to the unstructured</div>




<div>case.  For example, a DM can allow to access the Vec data by "stencil", which in the DMDA case is the usual thing,</div><div>and in the unstructured mesh case is, say, element restrictions.  This would encapsulate the "expanded space" idea</div>




<div>that Jed described a while ago in a tentative unstructured API.  This would require, however, some iterator model,</div><div>which is a kind of flexible local fine-granularity "on demand" scatter.</div></blockquote>


</div></div><br><div>This functionality is all in Level 3 of my earlier message, it's not a part of the DM API that Vec should be aware of.</div><div><br></div><div>The only parts of the DM API that I think Vec should be aware of is PetscLayout, the "overlap" scatters, and DMVecView.   The last one is purely cosmetic because VecGetDM, DMVecView is so common.</div>


<div><br></div><font color="#888888"><div>Jed</div>
</font></blockquote></div><br></div>