<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 5:46 PM, Boyce Griffith <span dir="ltr"><<a href="mailto:griffith@cims.nyu.edu" target="_blank">griffith@cims.nyu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3hd">There are no index sets available for the SAMRAI vector data.  The interface only provides access to "capital-V Vector Space" operations (vector addition, scalar multiplication, dot product, etc.).<br>

<br>
We've discussed this briefly before on some list --- petsc-dev? --- with Bobby Philip, but the basic story is that SAMRAI does patch-based AMR and separately allocates data for each patch as simple FORTRAN-style arrays (e.g. ghost cells are "co-mingled" with patch DOFs).  This makes it cumbersome to generate a Vec representation that plays nice with PETSc.<br>
</div></blockquote><div><br></div><div>Surely there is a way to distinguish ghost cells from non-ghost cells. Then you define a contiguous ordering/index set by simply marching through the non-ghost cells labeling them sequentially.<br>
</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3hd">
I am working on some code to make it feasible to map SAMRAI data onto a native PETSc Vec and to generate unique indices for the different data centerings provided by SAMRAI that we use regularly, but at least for now Amneet isn't trying to use that stuff.  (And by "working on", here I really mean thinking about working on while I am instead writing grant applications. ;-)<br>

<br>
It also seems almost feasible to use one of the existing DMs to wrap the SAMRAI data.  I haven't thought about this in a while and don't remember what I thought sounded like it was feasible.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But if you really want to use those other vector space wrappers, you can<br>
use VecNest.<br>
</blockquote>
<br></div>
Great --- this is what I had hoped and what Amneet was trying to figure out.</div></blockquote></div><br></div><div class="gmail_extra">If you really don't want to have an IS, you can use VecNestGetSubVec(), just be warned that this makes your code more brittle and harder to interoperate with.<br>
</div></div>